behavior object properties set prop/get prop

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: behavior object properties set prop/get prop

Post by mwieder » Sun Apr 21, 2013 3:37 am

Unfortunately it looks like you did the same thing Matt did - built this branch on top of the in-progress 6.0.1 changes. I can't compile those because I end up with

Code: Select all

make[1]: *** No rule to make target `../engine/include/revbuild.h', needed by `../_cache/linux/debug/libkernel/mcstring.o'.  Stop.
I'll have to backpedal and cherry-pick the changed files. I'd really rather keep these as separate branches off master. When the team gets the 6.0.1 bits done they'll merge them and then master will be up to date again. And we'll still have our separate dev branches without getting in each other's way.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 3:41 am

Yeah... problem is the setprop is sent to the object type class first.. eg MCButton and then that handles button only properties and then it's passed to MCControl then to MCGroup so each of the actual object type classes needs to handle sending set prop/get prop.

Unfortunately until 6.0.1 is merged I can't branch off master because I don't have Xcode 3.2.6 setup... are you saying that you can't make 6.0.1?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 4:09 am

OK... looks like the problem is that some configure script isn't being run on linux... Not sure what the plan is but I guess this will be fixed in order for RunRev to build linux 6.0.1... Anyway for now create revbuild.h from revbuild.h.in replacing the variables with whatever you want...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 4:12 am

hmm.. then you hit some ld errors...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 4:31 am

Arrgghh... so I can't branch off master because I can't compile and you can't branch off release because you can't compile... a little frustrating. The changes they have done to integrate the commercial edition build process must have not been tested on linux...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: behavior object properties set prop/get prop

Post by phaworth » Sun Apr 21, 2013 5:48 am

mwieder wrote:Pete - there are cases where you *can't* set a custom property. As in my example, try setting the thumbposition of a button. It doesn't exist as a built-in property of a button and you can't set it as a custom property. You have to come up with a new naming convention.
That's kinda my point. I know you can't have a custom property by the same name as a built in property and I'm sure it was designed that way for a good reason. Is it really so hard to set the uThumbpos of myControl? Objects have a set list of properties and enabling setting ones they don't have is asking for trouble.

Pete

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: behavior object properties set prop/get prop

Post by mwieder » Sun Apr 21, 2013 6:37 am

@Pete - the point of my example in this thread is that I have a knob control that is for all other purposed a scrollbar, just turned into a circle. It would make perfect sense to set the thumbposition of the control group, but I can't because thumbposition is a property of *only* scrollbars. With this new change I should be able to set the thumbposition and have circular scrollbars without having to resort to the trickery of setting the "uThumbposition" or the "knobPosition" or something else. If it otherwise acts like a scrollbar, then I should be able to treat it as a scrollbar. I shouldn't have to remember, and I shouldn't have to make users of my custom control remember, that the proper syntax is "uThumbposition", not "thumbposition".

Otherwise it's like saying that triangles are the only shapes that can be red.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 6:39 am

What kind of trouble?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: behavior object properties set prop/get prop

Post by mwieder » Sun Apr 21, 2013 6:45 am

Code: Select all

setprop mainStack pSomeValue
  quit
  -- LOL
end

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: behavior object properties set prop/get prop

Post by mwieder » Sun Apr 21, 2013 6:52 am

Monte- re: compiling, not to worry. I can wait for 6.0.1 to look at the getprop/setprop stuff. I've got plenty to work on here.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 6:53 am

:-)

So... Any ideas on the make issue? I did a checkout on the commit pre the make changes and it compiled fine. Could probably step through the commits and find the one that breaks the build...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: behavior object properties set prop/get prop

Post by monte » Sun Apr 21, 2013 7:11 am

yeah... the make dramas start on the first merge of the commercial integration branch
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: behavior object properties set prop/get prop

Post by LCMark » Sun Apr 21, 2013 5:02 pm

This might be because of stale dependencies after building for Linux before the recent changes... Try deleting the _cache and _build folders and then doing a make from top-level.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: behavior object properties set prop/get prop

Post by mwieder » Sun Apr 21, 2013 5:49 pm

No joy there after deleting both.

Code: Select all

./src/mcstring.cpp:22:22: fatal error: revbuild.h: No such file or directory
compilation terminated.
make[1]: *** [../_cache/linux/debug/libkernel/mcstring.o] Error 1

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1208
Joined: Thu Apr 11, 2013 11:27 am

Re: behavior object properties set prop/get prop

Post by LCMark » Sun Apr 21, 2013 5:59 pm

Ack - there should be a rule in the kernel make file for rebuild.h... It makes it from a template - so see if you can get that to run and all should be well. There must be a dependency issue preventing it from running in some cases (I'm sure it worked with a pristine repo clone before I committed :-S).

Locked

Return to “Engine Contributors”