building a control -- Well trying anyway

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

building a control -- Well trying anyway

Nakia Brewer
Hi,

I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
(the one that has the 'Done' 'Last' buttons on it etc)

So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.

My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.

Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?

In the stackscript of the library I am currently doing the below.

on showUIKeyboardToolbar
   ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
   -- Note, simply assuming the UIToolbar should be ~ 10% of its width
   put the working screenRect into tRect
   set the itemdel to comma
   put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
   put (item 4 of tRect - tHeight) into item 2 of tRect
   copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
   put it into tNewGroup
   set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
   show group tNewGroup of the current card of the current stack
end showUIKeyboardToolbar

on keyboardDeactivated
   ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
   delete group "UIKeyboardToolbar" of the current card of the current stack
end keyboardDeactivated


In the application stack on the landing UI Card I have

on openCard
   start using stack "LC_iOS_UIKeyboardToolbar"
   iphoneUseDeviceResolution true
end openCard

on keyboardActivated
   showUIKeyboardToolbar
end keyboardActivated





COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Main Google
Why make it so complicated? Just create the group on the card and show and hide it!

Gerry

> On 16 Nov 2013, at 9:21 pm, Nakia Brewer <[hidden email]> wrote:
>
> Hi,
>
> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Nakia Brewer
Yeah I do realise it's much easier that way but I want to challenge myself to learn how to build controls..

Also, I need to use this over many cards  (>20) so i imagine it easier to create and maintain a single instance of this control/group...



Sent from my iPhone

> On 16 Nov 2013, at 9:37 pm, "Gerry Orkin" <[hidden email]> wrote:
>
> Why make it so complicated? Just create the group on the card and show and hide it!
>
> Gerry
>
>> On 16 Nov 2013, at 9:21 pm, Nakia Brewer <[hidden email]> wrote:
>>
>> Hi,
>>
>> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
>> (the one that has the 'Done' 'Last' buttons on it etc)
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Richmond Mathewson-2
In reply to this post by Nakia Brewer
On 16.11.2013 12:21, Nakia Brewer wrote:

Why not have your ToolBar set up NOT as a stack, but as a background
group (which will then be propagated across all of your cards); then all
you need to do is toggle the VIS of that group?

Richmond.

> Hi,
>
> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)
>
> So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.
>
> My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.
>
> Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?
>
> In the stackscript of the library I am currently doing the below.
>
> on showUIKeyboardToolbar
>     ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
>     -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>     put the working screenRect into tRect
>     set the itemdel to comma
>     put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>     put (item 4 of tRect - tHeight) into item 2 of tRect
>     copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>     put it into tNewGroup
>     set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
>     show group tNewGroup of the current card of the current stack
> end showUIKeyboardToolbar
>
> on keyboardDeactivated
>     ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
>     delete group "UIKeyboardToolbar" of the current card of the current stack
> end keyboardDeactivated
>
>
> In the application stack on the landing UI Card I have
>
> on openCard
>     start using stack "LC_iOS_UIKeyboardToolbar"
>     iphoneUseDeviceResolution true
> end openCard
>
> on keyboardActivated
>     showUIKeyboardToolbar
> end keyboardActivated
>
>
>
>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

xtalkprogrammer
In reply to this post by Nakia Brewer
Hi Nakia,

Set the lockLoc of the group to true. This makes sure that any rects set
by script will stick.

When you change the rect of the group, the controls inside the group
won't resize automatically. You need a script to do this. You can add a
resizeControl handler to the group and change all controls' sizes in
response to that.

The border of the group may be invisible, making you to think that the
rect doesn't change while in fact it does change.

You write "this action does not complete". Do you get an error? What is
the exact text of the error?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 11:21, Nakia Brewer wrote:

> Hi,
>
> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)
>
> So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.
>
> My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.
>
> Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?
>
> In the stackscript of the library I am currently doing the below.
>
> on showUIKeyboardToolbar
>     ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
>     -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>     put the working screenRect into tRect
>     set the itemdel to comma
>     put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>     put (item 4 of tRect - tHeight) into item 2 of tRect
>     copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>     put it into tNewGroup
>     set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
>     show group tNewGroup of the current card of the current stack
> end showUIKeyboardToolbar
>
> on keyboardDeactivated
>     ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
>     delete group "UIKeyboardToolbar" of the current card of the current stack
> end keyboardDeactivated
>
>
> In the application stack on the landing UI Card I have
>
> on openCard
>     start using stack "LC_iOS_UIKeyboardToolbar"
>     iphoneUseDeviceResolution true
> end openCard
>
> on keyboardActivated
>     showUIKeyboardToolbar
> end keyboardActivated
>
>
>
>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Nakia Brewer
In reply to this post by Richmond Mathewson-2
I want to be able to also use this over a few different projects too.. Another reason I thought of doing it as a library.

Also, I currently have it at huge size for highest res screen I need so having it as a substack allows me to view the entire group as I can have that stack at a different size to the application stack...



Sent from my iPhone

> On 16 Nov 2013, at 10:00 pm, "Richmond" <[hidden email]> wrote:
>
> On 16.11.2013 12:21, Nakia Brewer wrote:
>
> Why not have your ToolBar set up NOT as a stack, but as a background group (which will then be propagated across all of your cards); then all you need to do is toggle the VIS of that group?
>
> Richmond.
>
>> Hi,
>>
>> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
>> (the one that has the 'Done' 'Last' buttons on it etc)
>>
>> So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.
>>
>> My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.
>>
>> Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?
>>
>> In the stackscript of the library I am currently doing the below.
>>
>> on showUIKeyboardToolbar
>>    ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
>>    -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>>    put the working screenRect into tRect
>>    set the itemdel to comma
>>    put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>>    put (item 4 of tRect - tHeight) into item 2 of tRect
>>    copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>>    put it into tNewGroup
>>    set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
>>    show group tNewGroup of the current card of the current stack
>> end showUIKeyboardToolbar
>>
>> on keyboardDeactivated
>>    ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
>>    delete group "UIKeyboardToolbar" of the current card of the current stack
>> end keyboardDeactivated
>>
>>
>> In the application stack on the landing UI Card I have
>>
>> on openCard
>>    start using stack "LC_iOS_UIKeyboardToolbar"
>>    iphoneUseDeviceResolution true
>> end openCard
>>
>> on keyboardActivated
>>    showUIKeyboardToolbar
>> end keyboardActivated
>>
>>
>>
>>
>>
>> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Walt Brown
In reply to this post by Nakia Brewer
Check what was returned in the "it" variable - it already contains the word
"group"

"set the rect of group tNewGroup"

Just a thought. I tested it in 5.5.2.

Walt


On Sat, Nov 16, 2013 at 5:21 AM, Nakia Brewer
<[hidden email]>wrote:

> Hi,
>
> I thought I might have ago at building a simple little control that
> simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)
>
> So, I have mocked up a group of objects in LC to simulate the look of the
> Native object (roughly close) and now I am trying to get it all to work.
>
> My current plan is to use this as a 'library' so I have it loaded as a
> substack of my test app. I want to be able to call it optionally depending
> on the field that bought the keyboard up.
>
> Now, so far I have got to the point of being able to copy the group from
> library stack to the current card of the current stack but have hit a
> stumble trying to perform any actions on the newly copied group. For
> example, I am trying to set the rect of the new group post creation and for
> the life of me cant get it to work.. Can anyone see something stupid below?
>
> In the stackscript of the library I am currently doing the below.
>
> on showUIKeyboardToolbar
>    ## First calculate the correct size for the UIKeyboardToolbar from the
> effective screen rect
>    -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>    put the working screenRect into tRect
>    set the itemdel to comma
>    put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>    put (item 4 of tRect - tHeight) into item 2 of tRect
>    copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of
> stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>    put it into tNewGroup
>    set the rect of group tNewGroup of the current card of the current
> stack to tRect -- This action does not complete and the copied group does
> not resize ???
>    show group tNewGroup of the current card of the current stack
> end showUIKeyboardToolbar
>
> on keyboardDeactivated
>    ## Destroy the copied group -- This works fine, when the keyboard
> closes the group is destroyed
>    delete group "UIKeyboardToolbar" of the current card of the current
> stack
> end keyboardDeactivated
>
>
> In the application stack on the landing UI Card I have
>
> on openCard
>    start using stack "LC_iOS_UIKeyboardToolbar"
>    iphoneUseDeviceResolution true
> end openCard
>
> on keyboardActivated
>    showUIKeyboardToolbar
> end keyboardActivated
>
>
>
>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may
> contain confidential proprietary or privileged information. If you are not
> the intended recipient, you are strictly prohibited from using,
> reproducing, disclosing or distributing the information contained in this
> email without authorisation from WesTrac. If you have received this message
> in error please contact WesTrac on +61 8 9377 9444. We do not accept
> liability in connection with computer virus, data corruption, delay,
> interruption, unauthorised access or unauthorised amendment. We reserve the
> right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Walt Brown
To be clearer, try changing: "set the rect of group tNewGroup"
To: "set the rect of tNewGroup".


On Sat, Nov 16, 2013 at 6:08 AM, Walt Brown <[hidden email]>wrote:

> Check what was returned in the "it" variable - it already contains the
> word "group"
>
> "set the rect of group tNewGroup"
>
> Just a thought. I tested it in 5.5.2.
>
> Walt
>
>
> On Sat, Nov 16, 2013 at 5:21 AM, Nakia Brewer <[hidden email]
> > wrote:
>
>> Hi,
>>
>> I thought I might have ago at building a simple little control that
>> simulates the iOS xCode UIKeyboardToolbar
>> (the one that has the 'Done' 'Last' buttons on it etc)
>>
>> So, I have mocked up a group of objects in LC to simulate the look of the
>> Native object (roughly close) and now I am trying to get it all to work.
>>
>> My current plan is to use this as a 'library' so I have it loaded as a
>> substack of my test app. I want to be able to call it optionally depending
>> on the field that bought the keyboard up.
>>
>> Now, so far I have got to the point of being able to copy the group from
>> library stack to the current card of the current stack but have hit a
>> stumble trying to perform any actions on the newly copied group. For
>> example, I am trying to set the rect of the new group post creation and for
>> the life of me cant get it to work.. Can anyone see something stupid below?
>>
>> In the stackscript of the library I am currently doing the below.
>>
>> on showUIKeyboardToolbar
>>    ## First calculate the correct size for the UIKeyboardToolbar from the
>> effective screen rect
>>    -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>>    put the working screenRect into tRect
>>    set the itemdel to comma
>>    put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>>    put (item 4 of tRect - tHeight) into item 2 of tRect
>>    copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of
>> stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>>    put it into tNewGroup
>>    set the rect of group tNewGroup of the current card of the current
>> stack to tRect -- This action does not complete and the copied group does
>> not resize ???
>>    show group tNewGroup of the current card of the current stack
>> end showUIKeyboardToolbar
>>
>> on keyboardDeactivated
>>    ## Destroy the copied group -- This works fine, when the keyboard
>> closes the group is destroyed
>>    delete group "UIKeyboardToolbar" of the current card of the current
>> stack
>> end keyboardDeactivated
>>
>>
>> In the application stack on the landing UI Card I have
>>
>> on openCard
>>    start using stack "LC_iOS_UIKeyboardToolbar"
>>    iphoneUseDeviceResolution true
>> end openCard
>>
>> on keyboardActivated
>>    showUIKeyboardToolbar
>> end keyboardActivated
>>
>>
>>
>>
>>
>> COPYRIGHT / DISCLAIMER: This message and/or including attached files may
>> contain confidential proprietary or privileged information. If you are not
>> the intended recipient, you are strictly prohibited from using,
>> reproducing, disclosing or distributing the information contained in this
>> email without authorisation from WesTrac. If you have received this message
>> in error please contact WesTrac on +61 8 9377 9444. We do not accept
>> liability in connection with computer virus, data corruption, delay,
>> interruption, unauthorised access or unauthorised amendment. We reserve the
>> right to monitor all e-mail communications.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: building a control -- Well trying anyway

Nakia Brewer
In reply to this post by xtalkprogrammer
Its showing the following error in the message window

Message execution error:
Error description: Chunk: can't find background
Hint:

Its failing when its trying to set the rect of the newly created group.
I have tried so far:

set the rect of group tNewControl to tRect
set the rect of control tNewControl to tRect


The contents of tNweControl are:
group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"

Im trying the lockLoc now
________________________________________
From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
Sent: Saturday, November 16, 2013 10:07 PM
To: How to use LiveCode
Subject: Re: building a control -- Well trying anyway

Hi Nakia,

Set the lockLoc of the group to true. This makes sure that any rects set
by script will stick.

When you change the rect of the group, the controls inside the group
won't resize automatically. You need a script to do this. You can add a
resizeControl handler to the group and change all controls' sizes in
response to that.

The border of the group may be invisible, making you to think that the
rect doesn't change while in fact it does change.

You write "this action does not complete". Do you get an error? What is
the exact text of the error?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 11:21, Nakia Brewer wrote:

> Hi,
>
> I thought I might have ago at building a simple little control that simulates the iOS xCode UIKeyboardToolbar
> (the one that has the 'Done' 'Last' buttons on it etc)
>
> So, I have mocked up a group of objects in LC to simulate the look of the Native object (roughly close) and now I am trying to get it all to work.
>
> My current plan is to use this as a 'library' so I have it loaded as a substack of my test app. I want to be able to call it optionally depending on the field that bought the keyboard up.
>
> Now, so far I have got to the point of being able to copy the group from library stack to the current card of the current stack but have hit a stumble trying to perform any actions on the newly copied group. For example, I am trying to set the rect of the new group post creation and for the life of me cant get it to work.. Can anyone see something stupid below?
>
> In the stackscript of the library I am currently doing the below.
>
> on showUIKeyboardToolbar
>     ## First calculate the correct size for the UIKeyboardToolbar from the effective screen rect
>     -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>     put the working screenRect into tRect
>     set the itemdel to comma
>     put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>     put (item 4 of tRect - tHeight) into item 2 of tRect
>     copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>     put it into tNewGroup
>     set the rect of group tNewGroup of the current card of the current stack to tRect -- This action does not complete and the copied group does not resize ???
>     show group tNewGroup of the current card of the current stack
> end showUIKeyboardToolbar
>
> on keyboardDeactivated
>     ## Destroy the copied group -- This works fine, when the keyboard closes the group is destroyed
>     delete group "UIKeyboardToolbar" of the current card of the current stack
> end keyboardDeactivated
>
>
> In the application stack on the landing UI Card I have
>
> on openCard
>     start using stack "LC_iOS_UIKeyboardToolbar"
>     iphoneUseDeviceResolution true
> end openCard
>
> on keyboardActivated
>     showUIKeyboardToolbar
> end keyboardActivated
>
>
>
>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: building a control -- Well trying anyway

Nakia Brewer
In reply to this post by Walt Brown
Yeah tried that, message box error "Script compile error:
Error description: create: no file name supplied"
________________________________________
From: use-livecode [[hidden email]] on behalf of Walt Brown [[hidden email]]
Sent: Saturday, November 16, 2013 10:20 PM
To: How to use LiveCode
Subject: Re: building a control -- Well trying anyway

To be clearer, try changing: "set the rect of group tNewGroup"
To: "set the rect of tNewGroup".


On Sat, Nov 16, 2013 at 6:08 AM, Walt Brown <[hidden email]>wrote:

> Check what was returned in the "it" variable - it already contains the
> word "group"
>
> "set the rect of group tNewGroup"
>
> Just a thought. I tested it in 5.5.2.
>
> Walt
>
>
> On Sat, Nov 16, 2013 at 5:21 AM, Nakia Brewer <[hidden email]
> > wrote:
>
>> Hi,
>>
>> I thought I might have ago at building a simple little control that
>> simulates the iOS xCode UIKeyboardToolbar
>> (the one that has the 'Done' 'Last' buttons on it etc)
>>
>> So, I have mocked up a group of objects in LC to simulate the look of the
>> Native object (roughly close) and now I am trying to get it all to work.
>>
>> My current plan is to use this as a 'library' so I have it loaded as a
>> substack of my test app. I want to be able to call it optionally depending
>> on the field that bought the keyboard up.
>>
>> Now, so far I have got to the point of being able to copy the group from
>> library stack to the current card of the current stack but have hit a
>> stumble trying to perform any actions on the newly copied group. For
>> example, I am trying to set the rect of the new group post creation and for
>> the life of me cant get it to work.. Can anyone see something stupid below?
>>
>> In the stackscript of the library I am currently doing the below.
>>
>> on showUIKeyboardToolbar
>>    ## First calculate the correct size for the UIKeyboardToolbar from the
>> effective screen rect
>>    -- Note, simply assuming the UIToolbar should be ~ 10% of its width
>>    put the working screenRect into tRect
>>    set the itemdel to comma
>>    put (.10*(item 3 of tRect - item 1 of tRect)) into tHeight
>>    put (item 4 of tRect - tHeight) into item 2 of tRect
>>    copy group "UIKeyboardToolbar" of card "iPhone_Standard_Portrait" of
>> stack "LC_iOS_UIKeyboardToolbar"  to the current card of the current stack
>>    put it into tNewGroup
>>    set the rect of group tNewGroup of the current card of the current
>> stack to tRect -- This action does not complete and the copied group does
>> not resize ???
>>    show group tNewGroup of the current card of the current stack
>> end showUIKeyboardToolbar
>>
>> on keyboardDeactivated
>>    ## Destroy the copied group -- This works fine, when the keyboard
>> closes the group is destroyed
>>    delete group "UIKeyboardToolbar" of the current card of the current
>> stack
>> end keyboardDeactivated
>>
>>
>> In the application stack on the landing UI Card I have
>>
>> on openCard
>>    start using stack "LC_iOS_UIKeyboardToolbar"
>>    iphoneUseDeviceResolution true
>> end openCard
>>
>> on keyboardActivated
>>    showUIKeyboardToolbar
>> end keyboardActivated
>>
>>
>>
>>
>>
>> COPYRIGHT / DISCLAIMER: This message and/or including attached files may
>> contain confidential proprietary or privileged information. If you are not
>> the intended recipient, you are strictly prohibited from using,
>> reproducing, disclosing or distributing the information contained in this
>> email without authorisation from WesTrac. If you have received this message
>> in error please contact WesTrac on +61 8 9377 9444. We do not accept
>> liability in connection with computer virus, data corruption, delay,
>> interruption, unauthorised access or unauthorised amendment. We reserve the
>> right to monitor all e-mail communications.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

xtalkprogrammer
In reply to this post by Nakia Brewer
Hi Nakia,

The problem is that tNewControl contains a long ID. If a variable
contains a long ID, you don't need to put "group" before the variable.
Because the long ID is a complete reference, you don't need to add a
reference to a card or a stack either.

Correct is:

set the rect of tNewGroup to tRect

Incorrect is:

set the rect of group tNewGroup of the current card of the current stack
to tRect

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 12:23, Nakia Brewer wrote:

> Its showing the following error in the message window
>
> Message execution error:
> Error description: Chunk: can't find background
> Hint:
>
> Its failing when its trying to set the rect of the newly created group.
> I have tried so far:
>
> set the rect of group tNewControl to tRect
> set the rect of control tNewControl to tRect
>
>
> The contents of tNweControl are:
> group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"
>
> Im trying the lockLoc now


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

RE: building a control -- Well trying anyway

Nakia Brewer
Thanks Mark, this has got it working in the IDE now!

Still an issue in the Sim but I'll be able to sort that one out.
________________________________________
From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
Sent: Saturday, November 16, 2013 10:39 PM
To: How to use LiveCode
Subject: Re: building a control -- Well trying anyway

Hi Nakia,

The problem is that tNewControl contains a long ID. If a variable
contains a long ID, you don't need to put "group" before the variable.
Because the long ID is a complete reference, you don't need to add a
reference to a card or a stack either.

Correct is:

set the rect of tNewGroup to tRect

Incorrect is:

set the rect of group tNewGroup of the current card of the current stack
to tRect

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 12:23, Nakia Brewer wrote:

> Its showing the following error in the message window
>
> Message execution error:
> Error description: Chunk: can't find background
> Hint:
>
> Its failing when its trying to set the rect of the newly created group.
> I have tried so far:
>
> set the rect of group tNewControl to tRect
> set the rect of control tNewControl to tRect
>
>
> The contents of tNweControl are:
> group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"
>
> Im trying the lockLoc now


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Nakia Brewer
Got it working kind of on the simulator but has anyone else had effective working screenRect reporting odd numbers when the iOS keyboard is up ?

 I'm getting 0,20,640,760 ???

I've tried waiting for 20 milliseconds after the keyboard activated message to read the value..

Note : I am using LC 5.5.3 and old xCode with iOS5.1 and 6.0 simulators... Might be time for upgrades ???





Sent from my iPhone

> On 16 Nov 2013, at 10:47 pm, "Nakia Brewer" <[hidden email]> wrote:
>
> Thanks Mark, this has got it working in the IDE now!
>
> Still an issue in the Sim but I'll be able to sort that one out.
> ________________________________________
> From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
> Sent: Saturday, November 16, 2013 10:39 PM
> To: How to use LiveCode
> Subject: Re: building a control -- Well trying anyway
>
> Hi Nakia,
>
> The problem is that tNewControl contains a long ID. If a variable
> contains a long ID, you don't need to put "group" before the variable.
> Because the long ID is a complete reference, you don't need to add a
> reference to a card or a stack either.
>
> Correct is:
>
> set the rect of tNewGroup to tRect
>
> Incorrect is:
>
> set the rect of group tNewGroup of the current card of the current stack
> to tRect
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
> colour spaces. http://www.color-converter.com
>
> Buy my new book "Programming LiveCode for the Real Beginner"
> http://qery.us/3fi
>
> Fill out this survey please
> http://livecodebeginner.economy-x-talk.com/survey/
>
>> On 11/16/2013 12:23, Nakia Brewer wrote:
>> Its showing the following error in the message window
>>
>> Message execution error:
>> Error description: Chunk: can't find background
>> Hint:
>>
>> Its failing when its trying to set the rect of the newly created group.
>> I have tried so far:
>>
>> set the rect of group tNewControl to tRect
>> set the rect of control tNewControl to tRect
>>
>>
>> The contents of tNweControl are:
>> group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"
>>
>> Im trying the lockLoc now
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

xtalkprogrammer
Hi,

I have the same problem on Android. The animated movement of the
keyboard takes almost 500 milliseconds. If I wait 500 milliseconds with
messages before continuing the script, it works fine. 500 seems long,
but give it a try.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 13:47, Nakia Brewer wrote:

> Got it working kind of on the simulator but has anyone else had effective working screenRect reporting odd numbers when the iOS keyboard is up ?
>
>   I'm getting 0,20,640,760 ???
>
> I've tried waiting for 20 milliseconds after the keyboard activated message to read the value..
>
> Note : I am using LC 5.5.3 and old xCode with iOS5.1 and 6.0 simulators... Might be time for upgrades ???
>
>
>
>
>
> Sent from my iPhone
>
>> On 16 Nov 2013, at 10:47 pm, "Nakia Brewer" <[hidden email]> wrote:
>>
>> Thanks Mark, this has got it working in the IDE now!
>>
>> Still an issue in the Sim but I'll be able to sort that one out.
>> ________________________________________
>> From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
>> Sent: Saturday, November 16, 2013 10:39 PM
>> To: How to use LiveCode
>> Subject: Re: building a control -- Well trying anyway
>>
>> Hi Nakia,
>>
>> The problem is that tNewControl contains a long ID. If a variable
>> contains a long ID, you don't need to put "group" before the variable.
>> Because the long ID is a complete reference, you don't need to add a
>> reference to a card or a stack either.
>>
>> Correct is:
>>
>> set the rect of tNewGroup to tRect
>>
>> Incorrect is:
>>
>> set the rect of group tNewGroup of the current card of the current stack
>> to tRect
>>
>> --
>> Best regards,
>>
>> Mark Schonewille
>>
>> Economy-x-Talk Consulting and Software Engineering
>> Homepage: http://economy-x-talk.com
>> Twitter: http://twitter.com/xtalkprogrammer
>> KvK: 50277553
>>
>> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
>> colour spaces. http://www.color-converter.com
>>
>> Buy my new book "Programming LiveCode for the Real Beginner"
>> http://qery.us/3fi
>>
>> Fill out this survey please
>> http://livecodebeginner.economy-x-talk.com/survey/
>>
>>> On 11/16/2013 12:23, Nakia Brewer wrote:
>>> Its showing the following error in the message window
>>>
>>> Message execution error:
>>> Error description: Chunk: can't find background
>>> Hint:
>>>
>>> Its failing when its trying to set the rect of the newly created group.
>>> I have tried so far:
>>>
>>> set the rect of group tNewControl to tRect
>>> set the rect of control tNewControl to tRect
>>>
>>>
>>> The contents of tNweControl are:
>>> group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"
>>>
>>> Im trying the lockLoc now
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: building a control -- Well trying anyway

Paul Hibbert
In reply to this post by Nakia Brewer

On 2013-11-16, at 2:21 AM, Nakia Brewer <[hidden email]> wrote:

Hi Nakia,

Try replacing…

  put it into tNewGroup

with

  put the short name of it into tNewGroup


In you original script tNewGroup contains the full ID of the group placed, so using "short name" pulls just the group name from "it".

Paul
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: building a control -- Well trying anyway

Nakia Brewer
In reply to this post by xtalkprogrammer
Hmmm, it might be time for upgrade my xCode and LC.
I have tried waiting all the way up to 5000 Milliseconds with messages but to an avail, still getting random numbers reported.

FYI xCode 4.5.1 and LC 5.5.3

The factor is the error it returns seems to vary with which Simulator I use.
________________________________________
From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
Sent: Saturday, November 16, 2013 11:50 PM
To: How to use LiveCode
Subject: Re: building a control -- Well trying anyway

Hi,

I have the same problem on Android. The animated movement of the
keyboard takes almost 500 milliseconds. If I wait 500 milliseconds with
messages before continuing the script, it works fine. 500 seems long,
but give it a try.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/16/2013 13:47, Nakia Brewer wrote:

> Got it working kind of on the simulator but has anyone else had effective working screenRect reporting odd numbers when the iOS keyboard is up ?
>
>   I'm getting 0,20,640,760 ???
>
> I've tried waiting for 20 milliseconds after the keyboard activated message to read the value..
>
> Note : I am using LC 5.5.3 and old xCode with iOS5.1 and 6.0 simulators... Might be time for upgrades ???
>
>
>
>
>
> Sent from my iPhone
>
>> On 16 Nov 2013, at 10:47 pm, "Nakia Brewer" <[hidden email]> wrote:
>>
>> Thanks Mark, this has got it working in the IDE now!
>>
>> Still an issue in the Sim but I'll be able to sort that one out.
>> ________________________________________
>> From: use-livecode [[hidden email]] on behalf of Mark Schonewille [[hidden email]]
>> Sent: Saturday, November 16, 2013 10:39 PM
>> To: How to use LiveCode
>> Subject: Re: building a control -- Well trying anyway
>>
>> Hi Nakia,
>>
>> The problem is that tNewControl contains a long ID. If a variable
>> contains a long ID, you don't need to put "group" before the variable.
>> Because the long ID is a complete reference, you don't need to add a
>> reference to a card or a stack either.
>>
>> Correct is:
>>
>> set the rect of tNewGroup to tRect
>>
>> Incorrect is:
>>
>> set the rect of group tNewGroup of the current card of the current stack
>> to tRect
>>
>> --
>> Best regards,
>>
>> Mark Schonewille
>>
>> Economy-x-Talk Consulting and Software Engineering
>> Homepage: http://economy-x-talk.com
>> Twitter: http://twitter.com/xtalkprogrammer
>> KvK: 50277553
>>
>> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
>> colour spaces. http://www.color-converter.com
>>
>> Buy my new book "Programming LiveCode for the Real Beginner"
>> http://qery.us/3fi
>>
>> Fill out this survey please
>> http://livecodebeginner.economy-x-talk.com/survey/
>>
>>> On 11/16/2013 12:23, Nakia Brewer wrote:
>>> Its showing the following error in the message window
>>>
>>> Message execution error:
>>> Error description: Chunk: can't find background
>>> Hint:
>>>
>>> Its failing when its trying to set the rect of the newly created group.
>>> I have tried so far:
>>>
>>> set the rect of group tNewControl to tRect
>>> set the rect of control tNewControl to tRect
>>>
>>>
>>> The contents of tNweControl are:
>>> group id 1080 of card id 1002 of stack "/Users/nakia/Desktop/UIKeyboardToolbar Test App.livecode"
>>>
>>> Im trying the lockLoc now
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


COPYRIGHT / DISCLAIMER: This message and/or including attached files may contain confidential proprietary or privileged information. If you are not the intended recipient, you are strictly prohibited from using, reproducing, disclosing or distributing the information contained in this email without authorisation from WesTrac. If you have received this message in error please contact WesTrac on +61 8 9377 9444. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. We reserve the right to monitor all e-mail communications.



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode