publish and surprise

2019-10-01 Thread Mark Wieder via use-livecode
I have finally gotten around to noticing that LC9.x builds have opened 
the publish-and-subscribe mechanism to arbitrary messages. I'm not sure 
when this happened and I'm really not inclined to go searching through 
all those release notes, but I'm ecstatic over the surprise discovery. 
This means objects can register interest in certain messages to do 
something like


object1:
revIDESubscribe "helloworld"

object2:
revIDESubscribe "helloworld"

object3:
ideMessageSendWithParameters "helloworld"

and both object1 and object2 will get notifications, fully implementing 
the Publish-and-Subscribe design pattern.


Thank you team.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export snapshot and errors...

2019-10-01 Thread Bob Sneidar via use-livecode
Thanks Paul. They should replace the dictionary description with your version, 
as yours makes a LOT more sense! I read the dictionary too, but came away 
confused. 

Bob S

> On Oct 1, 2019, at 08:59 , Paul Dupuis via use-livecode 
>  wrote:
> 
> According to the Dictionary, if I am reading it correctly, in a command (vs 
> function)
> 
> return empty -- sets both 'it' and 'the result' to the parameter of the 
> return statement (in this case empty)
> return empty for value -- sets 'it' to the parameter (empty) and clears 'the 
> result' indicating no error (empty)
> return empty for error -- set 'the result' to the parameter (empty) and 
> clears 'it' (empty) indicating no value returned from the command
> 
> So, yes, "return empty" will do, but I choose to use "return empty for error" 
> to remind me that it is purposefully 'the result' that I wanted to clear.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export snapshot and errors...

2019-10-01 Thread Paul Dupuis via use-livecode
According to the Dictionary, if I am reading it correctly, in a command 
(vs function)


return empty -- sets both 'it' and 'the result' to the parameter of the 
return statement (in this case empty)
return empty for value -- sets 'it' to the parameter (empty) and clears 
'the result' indicating no error (empty)
return empty for error -- set 'the result' to the parameter (empty) and 
clears 'it' (empty) indicating no value returned from the command


So, yes, "return empty" will do, but I choose to use "return empty for 
error" to remind me that it is purposefully 'the result' that I wanted 
to clear.



On 10/1/2019 10:39 AM, Bob Sneidar via use-livecode wrote:

Is the for error necessary? I just return empty.

Bob S



On Oct 1, 2019, at 06:02 , Paul Dupuis via use-livecode 
 wrote:

command clearResult
   return empty for error
end clearResult


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hactoberfest is coming...

2019-10-01 Thread Mike Kerner via use-livecode
LOL, sorry, not a list field, a list of ideas.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hactoberfest is coming...

2019-10-01 Thread Bob Sneidar via use-livecode
Responding to this:

Looking for ideas to add to a list that people can pick from.

> On Oct 1, 2019, at 08:27 , Mike Kerner via use-livecode 
>  wrote:
> 
> wrong thread, i think, bob.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hactoberfest is coming...

2019-10-01 Thread Mike Kerner via use-livecode
wrong thread, i think, bob.

On Tue, Oct 1, 2019 at 10:55 AM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike.
>
> I do this already in some "popup" fields I use. (There are reasons I use
> fields instead of buttons I won't go into here.)
>
> Depending on the popup, I may have an option like "New Customer..." as the
> first line in a list field. For my customers I maintain the last 15
> customers accessed, and I store them between sessions in a local prefs file
> (each user needs their own recents). I have a Salesperson popup which
> behaves a bit differently. Here I maintain a list of salespersons in an SQL
> table called "lists" so that everyone sees the same list of salespersons.
> If a value is entered for a salesperson not in the list, I ask the user if
> they want to add this salesperson. This gives the user the opportunity to
> decline in case it is simply a mistype.
>
> I will often use a rawKeyUp handler to implement a hottype feature. Looks
> something like this:
>
> ON rawKeyUp
>IF the text of me is empty THEN
>   exit to top
>END IF
>
>wait .5 seconds WITH messages
>lock messages
>put filterOptions(lSalesPersons) into theSalesPersons
>listOptions theSalesPersons
>unlock messages
>select after me
>-- pass rawKeyUp
>exit to top
> END rawKeyUp
>
> lSalesPersons is script local variable that I populate with the
> salespersons on openField. filterOptions returns a list matching
> salespersons LIKE %%. listOptions
> populates the popup field so the user can select one of the filtered
> salespersons.
>
> HTH
>
> Bob S
>
> > On Oct 1, 2019, at 06:26 , Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Looking for ideas to add to a list that people can pick from.
> > The good news is that if you want a cheap PR to get you toward your
> > Hacktoberfest swag, instead of posting your idea here, you can update the
> > 100% totally unofficial LC hacktoberfest repo here:
> > https://github.com/macMikey/lc-hacktoberfest
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hactoberfest is coming...

2019-10-01 Thread Bob Sneidar via use-livecode
Hi Mike. 

I do this already in some "popup" fields I use. (There are reasons I use fields 
instead of buttons I won't go into here.) 

Depending on the popup, I may have an option like "New Customer..." as the 
first line in a list field. For my customers I maintain the last 15 customers 
accessed, and I store them between sessions in a local prefs file (each user 
needs their own recents). I have a Salesperson popup which behaves a bit 
differently. Here I maintain a list of salespersons in an SQL table called 
"lists" so that everyone sees the same list of salespersons. If a value is 
entered for a salesperson not in the list, I ask the user if they want to add 
this salesperson. This gives the user the opportunity to decline in case it is 
simply a mistype. 

I will often use a rawKeyUp handler to implement a hottype feature. Looks 
something like this:

ON rawKeyUp
   IF the text of me is empty THEN
  exit to top
   END IF
   
   wait .5 seconds WITH messages
   lock messages
   put filterOptions(lSalesPersons) into theSalesPersons
   listOptions theSalesPersons
   unlock messages
   select after me
   -- pass rawKeyUp
   exit to top
END rawKeyUp

lSalesPersons is script local variable that I populate with the salespersons on 
openField. filterOptions returns a list matching salespersons LIKE %%. listOptions populates the popup field so the user 
can select one of the filtered salespersons. 

HTH

Bob S

> On Oct 1, 2019, at 06:26 , Mike Kerner via use-livecode 
>  wrote:
> 
> Looking for ideas to add to a list that people can pick from.
> The good news is that if you want a cheap PR to get you toward your
> Hacktoberfest swag, instead of posting your idea here, you can update the
> 100% totally unofficial LC hacktoberfest repo here:
> https://github.com/macMikey/lc-hacktoberfest


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export snapshot and errors...

2019-10-01 Thread Bob Sneidar via use-livecode
Is the for error necessary? I just return empty. 

Bob S


> On Oct 1, 2019, at 06:02 , Paul Dupuis via use-livecode 
>  wrote:
> 
> command clearResult
>   return empty for error
> end clearResult


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hactoberfest is coming...

2019-10-01 Thread Mike Kerner via use-livecode
Looking for ideas to add to a list that people can pick from.
The good news is that if you want a cheap PR to get you toward your
Hacktoberfest swag, instead of posting your idea here, you can update the
100% totally unofficial LC hacktoberfest repo here:
https://github.com/macMikey/lc-hacktoberfest

On Fri, Sep 27, 2019 at 4:40 PM Mike Kerner 
wrote:

> click on the "start hacking" button in the page and you can sign up.  i
> don't know what it will do for people who don't already have a github
> account, but here's what I got:
>
>
>
> [image: Hacktoberfest 2019]
>
>
>
> You’re officially registered for Hacktoberfest 2019! So we wanted to send
> you everything you’ll need to help you get started.
>
> A good place to dive in is our Details
>  page, which breaks down
> the fine print for this year’s event. We also put together a list of
> contribution ideas that may help spark some contribution ideas. If you’d
> like to link up with other local Hacktoberfest participants, have a look at
> our Events  page to see
> what’s happening near you. For common questions, take a look at our FAQs
> . And finally, check out the 
> "Getting
> Started " resource put
> together by our friends over at DEV .
>
> As this year’s event kicks off, we hope you’ll spread the word about
> #Hacktoberfest across your social media channels!
>
> Happy Hacking,
> Team Hacktoberfest
>
> On Thu, Sep 26, 2019 at 5:50 PM Pi Digital via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Was that response email for signing up to GitHub perhaps. The
>> Hacktoberfest site says everywhere I look:
>>
>> You can sign up anytime between October 1 and October 31.
>>
>> There are no links I can find to sign up to the fest yet, just a few
>> links to github which will ask you to sign in/up when it loads.
>>
>> Sean Cole
>> Pi Digital Prod Ltd
>>
>> > On 26 Sep 2019, at 21:47, Mike Kerner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> > are you sure?  i registered 10 minutes before i posted that email and
>> > received a confirmation, so did i post the wrong link?
>> >
>> >> On Wed, Sep 25, 2019 at 5:06 PM Pi Digital via use-livecode <
>> >> use-livecode@lists.runrev.com> wrote:
>> >>
>> >> Correction. You can only begin registering from 1st October according
>> to
>> >> the site.
>> >>
>> >> I’m going to be submitting a bunch of fixes and updates for HTML5
>> >> deployment to get it usable professionally again. But I have to weave
>> this
>> >> around my (barely) paid work developing a web app using the broken
>> version
>> >> (with the current workarounds which are enough for now).
>> >>
>> >> Sean Cole
>> >> Pi Digital Prod Ltd
>> >>
>> >>> On 25 Sep 2019, at 21:05, Mike Kerner via use-livecode <
>> >> use-livecode@lists.runrev.com> wrote:
>> >>>
>> >>> The Hacktoberfest registration is now open:
>> >>> https://hacktoberfest.digitalocean.com
>> >>> <
>> >>
>> https://hacktoberfest.digitalocean.com/?utm_source=local_medium=email_campaign=Hacktoberfest2019
>> >>>
>> >>>
>> >>> Get registered and then between October 1, and 31, make 3 pull
>> requests
>> >> to
>> >>> projects housed on GitHub, and get your 2019 Hactoberfest swag!
>> >>>
>>  On Sat, Sep 7, 2019 at 12:43 PM Mark Wieder via use-livecode <
>>  use-livecode@lists.runrev.com> wrote:
>> 
>>  Just want to point out a good candidate for pull requests here. Ripe
>> for
>>  some sample xtalk code:
>> 
>>  https://github.com/EricAlcaide/Rosetta_Project
>> 
>>  --
>>  Mark Wieder
>>  ahsoftw...@gmail.com
>> 
>>  ___
>>  use-livecode mailing list
>>  use-livecode@lists.runrev.com
>>  Please visit this url to subscribe, unsubscribe and manage your
>>  subscription preferences:
>>  http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> >>>
>> >>>
>> >>> --
>> >>> On the first day, God created the heavens and the Earth
>> >>> On the second day, God created the oceans.
>> >>> On the third day, God put the animals on hold for a few hours,
>> >>>  and did a little diving.
>> >>> And God said, "This is good."
>> >>> ___
>> >>> use-livecode mailing list
>> >>> use-livecode@lists.runrev.com
>> >>> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >> ___
>> >> use-livecode mailing list
>> >> use-livecode@lists.runrev.com
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >
>> >
>> > --
>> > On the first day, God created the heavens and 

Re: Export snapshot and errors...

2019-10-01 Thread Paul Dupuis via use-livecode

On 10/1/2019 8:58 AM, Paul Dupuis via use-livecode wrote:
In LC905rc1, the Dictionary entry for Export Snapshot does not appear 
to indicate how any error value is returned (for example if the file 
can not be written)


the result is not cleared after an export snapshot - i.e.

put the result into tTemp1 -- if this put "X" in tTemp1
export snapshot from this cd of stack "Images" to file tFile as PNG
put the result into tTemp2 -- the result is still "X"

So, does export snapshot return any error values. Shouldn't it? Is 
this a Documentation bug and there is some return value that is not 
documented or an Engine bug and if Export Snapshot encounters and 
error, it should return an error message in the result or empty in the 
result if successful?


Related: Anybody have a good tip to CLEAR "the result"? If you really 
want to be sure it is empty before calling something that may change it?




Answer my own question on how to clear the result with:

command clearResult
  return empty for error
end clearResult

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Export snapshot and errors...

2019-10-01 Thread Paul Dupuis via use-livecode
In LC905rc1, the Dictionary entry for Export Snapshot does not appear to 
indicate how any error value is returned (for example if the file can 
not be written)


the result is not cleared after an export snapshot - i.e.

put the result into tTemp1 -- if this put "X" in tTemp1
export snapshot from this cd of stack "Images" to file tFile as PNG
put the result into tTemp2 -- the result is still "X"

So, does export snapshot return any error values. Shouldn't it? Is this 
a Documentation bug and there is some return value that is not 
documented or an Engine bug and if Export Snapshot encounters and error, 
it should return an error message in the result or empty in the result 
if successful?


Related: Anybody have a good tip to CLEAR "the result"? If you really 
want to be sure it is empty before calling something that may change it?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode