Search found 385 matches

by SamuraiCrow
Thu Jan 07, 2021 8:59 pm
Forum: RapaGUI
Topic: Advanced RapaGUI techniques
Replies: 20
Views: 1615

Re: Advanced RapaGUI techniques

a few days ago, I added the rectangle and button classes to RapaEdit. It took surprisingly little effort. When I made the rectangle class, all I had to do was change a copy of the group class to be a single item of type rectangle. Rectangle class has no editable fields so most of the editing methods...
by SamuraiCrow
Fri Jan 01, 2021 2:55 am
Forum: RapaGUI
Topic: Advanced RapaGUI techniques
Replies: 20
Views: 1615

Re: Advanced RapaGUI techniques

Before I get into the GenerateXML recursion, I realized I didn't finish my object-oriented polymorphism discussion before. If you look at the files in the Gadgets directory of the RapaEdit repository, you'll notice that all of them have equivalent functions with the same names in the namespace table...
by SamuraiCrow
Mon Dec 21, 2020 9:38 pm
Forum: General programming
Topic: Can I self = NIL somehow in OOP?
Replies: 8
Views: 563

Re: Can I self = NIL somehow in OOP?

Correct! Now you're getting it!
by SamuraiCrow
Mon Dec 21, 2020 8:45 pm
Forum: General programming
Topic: Can I self = NIL somehow in OOP?
Replies: 8
Views: 563

Re: Can I self = NIL somehow in OOP?

The real problem with your example code is that the "a" variable is global and never goes out of scope. In order to be fully nullified, all uses of the handle to the table need to be Nil, not just one of them. Variable handles are reference counted so if one is forced to Nil, that handle will go out...
by SamuraiCrow
Mon Dec 21, 2020 5:09 pm
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 1242

Re: Any way to have Function save its Args for later use?

Your prt variable is global so you aren't actually passing a parameter. If you stuff your parameters in a global table instead of garbage collecting them, then it will work.
by SamuraiCrow
Mon Dec 21, 2020 5:03 pm
Forum: General programming
Topic: Can I self = NIL somehow in OOP?
Replies: 8
Views: 563

Re: Can I self = NIL somehow in OOP?

Do you get an error or just disappointment that the garbage collector isn't instant?
by SamuraiCrow
Mon Dec 21, 2020 3:30 am
Forum: Off topic
Topic: Am I the only one here using GitHub with Hollywood?
Replies: 9
Views: 2621

Re: Am I the only one here using GitHub with Hollywood?

After months away from my little HW project, I found it difficult to restart working on it: the last changes I made were disorganized and uncommented. I was feeling like I have to start again when I remembered I had uploaded to github (and bitbucket also). So I cloned it and got my last working cop...
by SamuraiCrow
Sun Dec 20, 2020 8:21 pm
Forum: RapaGUI
Topic: Advanced RapaGUI techniques
Replies: 20
Views: 1615

Re: Advanced RapaGUI techniques

Hello everyone! Now it's time for my demonstration of class polymorphism for Hollywood. Don't worry too much about the object-oriented terminology, I define it later in this article. In order to set all the defaults in the window table for the child classes derived from it, I make an inner table cal...
by SamuraiCrow
Thu Dec 17, 2020 1:19 am
Forum: General programming
Topic: How to make a wrapper of same named function/command?
Replies: 4
Views: 412

Re: How to make a wrapper of same named function/command?

Hi Bugala! The closest you can get is either to define 2 versions of the same function using preprocessor macros that check for a constant declared on the command line or 2 versions of an additional function that can be called in the beginning or end of the debugger version of the original using the...
by SamuraiCrow
Wed Dec 16, 2020 12:02 am
Forum: RapaGUI
Topic: Advanced RapaGUI techniques
Replies: 20
Views: 1615

Re: Advanced RapaGUI techniques

Great. I'll follow your github link and this thread. Thanks. You're welcome! Last time I used a form of polymorphism to invoke a different handler depending on the prefix of the ID sent to the input handler. One thing I forgot to mention was that for it to work properly, each handler has to process...