Re: Script Only Stack Architecture

2016-04-02 Thread Earthednet-wp
I wonder how hard it would be to port max's Wikia wiki to a less commercial 
host. I am  skeptical of those free sites dedicated to scraping user 
information for data mining purposes. Livecode could support it as part of 
their resources, as an experiment to see how it develops?

Bill

William Prothero
http://es.earthednet.org

> On Apr 2, 2016, at 2:44 PM, Richard Gaskin  wrote:
> 
> Sannyasin Brahmanathaswami
> 
> > Kay C Lan wrote:
> >>
> >> IMO the ideal solution would be the Dictionary act like a Wiki
> >> Editor.
> >
> > I had a parallel thought this morning. Many languages have their
> > "wiki space"
> >
> > Given the enormity of the task of turning the dictionary into
> > something like that...don't bother... let it be what it is. Just
> > start a new empty wiki.
> >
> > Begin simply: As soon as subject arise of value, instantiate the
> > subject / theme and put the info there.
> >
> > I would be happy to participate.
> 
> MaxV already started one - dive in:
> 
> 
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.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

___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/2/2016 11:05 PM, Richard Gaskin wrote:


put the EFFECTIVE formattedheight of \
   char 1 to -1 of pObj into tFheight

There it is! "EFFECTIVE"!


Would be nice if that were documented. Hmph. Need user notes.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Script Only Stack Architecture

2016-04-02 Thread Sannyasin Brahmanathaswami
I think I'm too bitten (happily so) now with the class/super/class behaviors 
hierarchy ( have already set the behavior of a behavior, fantastic!)   In fact 
it's hard to stop envisioning all the ways to use this feature, and I don't 
want the bound up in a single binary file object... as the goal is, in the next 
few months to distribute the developement across a bigger team.

So I'm going to get work done now ... I have flown to the world of WHEW  
(WHatEver Works)

If setting the stack files and opening them in the preopenhandler works, that's 
what I'll do, if the only certain way to save script only stacks is by clicking 
on the contextual menu and explicitely choosing "Save" (in  the AB and PB) 
that's what I'll do.

My auto save is working (every 30  min), and I'm saving more frequently,  so I 
can recover quickly.

I got a lot done today...

What I will  give myself a break on is reporting all the bugs in LC816 and just 
push to work around them...or ask here, since (as we are seeing with formatted 
height) others have worked around bugs before.

BR



On April 2, 2016 at 5:43:32 PM, Richard Gaskin 
(ambassa...@fourthworld.com) wrote:

You've had a wide range of issues to contend with, from file corruption
to mysterious plugins and more. Give yourself a break for a day or two:
get one thing working, and only then change something else.

Sorting out the behaviors would seem to merit attention. If script-only
files are a distraction setting them aside and just using the binary
stacks you seem more comfortable with for now will let you focus on one
thing at a time.
___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
My best guess at the tme was that the effective modifier ignores the area 
reserved for the maximum ascenders and descenders. Also char 1 to -1 worked 
better than line 1 to -1 if I remember correctly. 


Ralph DiMola
IT Director
Evergreen Information Services



 Original message From: Richard Gaskin 
 Date:04/03/2016  00:05  (GMT-05:00) 
To: use-livecode@lists.runrev.com Subject: Re: Set Text 
to the Vertical Center of the field 
Ralph DiMola wrote:

put the EFFECTIVE formattedheight of \
   char 1 to -1 of pObj into tFheight

There it is! "EFFECTIVE"!

Once I use Jacque's technique of omitting the margins by obtaining only 
the formattedHeight of the text itself, and Ralph's astute awareness 
that apparently it's possible to have a formattedHeight different from 
an EFFECTIVE formattedHeight, all four versions of this algo adjusted 
with those changes work well to produce the same good result.

Ralph, help me out here:  under what circumstances would the 
formattedHeight and the effectiveFormattedHeight differ for a range of text?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.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
___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
This was when I was a newbie and developing my resizing library and I called it 
with the wrong control type.

Ralph DiMola
IT Director
Evergreen Information Services



 Original message From: Richard Gaskin 
 Date:04/02/2016  23:59  (GMT-05:00) 
To: use-livecode@lists.runrev.com Subject: Re: Set Text 
to the Vertical Center of the field 
Ralph DiMola wrote:

>try
> put item 1 of the margins of obj into item 1 of tMargins
> put item 3 of the margins of obj into item 3 of tMargins
>catch SomeError
> exit CenterVert -- Can't get margins?... do nothing
>end try

Now I'm even more worried:  is there a cirumstance in which querying the 
margins can result in a thrown error?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.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
___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin

Ralph DiMola wrote:

   put the EFFECTIVE formattedheight of \
  char 1 to -1 of pObj into tFheight

There it is! "EFFECTIVE"!

Once I use Jacque's technique of omitting the margins by obtaining only 
the formattedHeight of the text itself, and Ralph's astute awareness 
that apparently it's possible to have a formattedHeight different from 
an EFFECTIVE formattedHeight, all four versions of this algo adjusted 
with those changes work well to produce the same good result.


Ralph, help me out here:  under what circumstances would the 
formattedHeight and the effectiveFormattedHeight differ for a range of text?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin

Ralph DiMola wrote:


   try
put item 1 of the margins of obj into item 1 of tMargins
put item 3 of the margins of obj into item 3 of tMargins
   catch SomeError
exit CenterVert -- Can't get margins?... do nothing
   end try


Now I'm even more worried:  is there a cirumstance in which querying the 
margins can result in a thrown error?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Script Only Stack Architecture

2016-04-02 Thread Richard Gaskin

Sannyasin Brahmanathaswami wrote:

> Small addendum, now that I'm actually using them. Today, though I
> had added them as stack files, my three external stack file
> behaviors were still not in the message path.

That's contrary to my own experience, which I'd tested again to make 
double-sure just the other morning before I posted the note about 
stackFiles.


There must be something else going on.  Without seeing the complete 
collection of stack files I'm unable to offer further advice on this.



> Not clear to me yet exactly when and how you can trigger a save of
> an external script only stack.

Have you tried the "save" command?


The other day I wrote:

   It may be helpful while demystifying this to work with ordinary
   stack files for your behavior scripts.  There's really no
   difference between ordinary stack files and script-only stack
   files beyond the storage format, but if nothing else sense
   you're already confident in your use of normal stacks it may
   help you focus on the things that may actually be the source of
   the problem.

You've had a wide range of issues to contend with, from file corruption 
to mysterious plugins and more.  Give yourself a break for a day or two: 
 get one thing working, and only then change something else.


Sorting out the behaviors would seem to merit attention.  If script-only 
files are a distraction setting them aside and just using the binary 
stacks you seem more comfortable with for now will let you focus on one 
thing at a time.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Script Only Stack Architecture

2016-04-02 Thread Sannyasin Brahmanathaswami
 
Small addendum, now that I'm actually using them. Today, though I had added 
them as stack files, my three external stack file behaviors were still not in 
the message path.

But, now, having added them it the stack files.. you can open them without 
declaring a path.  


command initializeInterface
set the defaultstack to "SivaSiva"
open stack "generic-mobile-functions_behavior"
open stack "siva_fields_behavior
open stack "siva_portal-links_behavior"


Now they a) appear in the behaviors area to be chosen and applied b) work... 

STILL MYSTERIOUS

Not clear to me yet exactly when and how you can trigger a save of an external 
script only stack.

Once you get the hang of this, the new edit script button in the behaviors for 
your object is going to be your go to button.. edit the exteral script apply.. 
let's say you have done extensive changes in to that script only stack behavior.

At that moment, how do you save it? When I save the main stack, the Modal 
feedback does not show the external stacks being saved... on the main stack and 
1 binary substack.



On April 1, 2016 at 4:34:56 AM, Ali Lloyd 
(ali.ll...@livecode.com(mailto:ali.ll...@livecode.com)) wrote:

> > > > ergo: merely opening a script-only stack that is applied as a
> > > > behavior to a control (not global in scope) does *not* place
> > > > into the msg path.
___
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: File exists

2016-04-02 Thread JB
Thanks for the code and info, Kay.

JB



> On Apr 2, 2016, at 10:53 AM, Kay C Lan  wrote:
> 
> On Sat, Apr 2, 2016 at 4:48 PM, JB  wrote:
>> If I open a file for read or write and the file does
>> not exist it will be created.
> 
> Just to clarify, that statement is incorrect.
> 
> If you open a file for 'write' and the file does not exist, it will be 
> created.
> 
> if you open a file for 'read' and the file does not exist 'the result'
> will be "can't open that file" and NO file is created.
> 
> on mouseUp
>   set the defaultFolder to specialFolderPath("documents")
>   open file "this is a test.lcdoc" for read
>   if  (the result is "can't open that file") then
>  --check if a file was created
>  if (there is a file "this is a test.lcdoc") then
> answer "A file was created!"
>  else
> answer "The file was NOT created."
>  end if
>   else
>  answer "You can read from it now!"
>   end if
> end mouseUp
> 
> Please also note that Richmond's example is misleading. If you use
> 'read from file' without first using  'open file' then regardless of
> whether the file exists or not, 'it' will always be empty.
> 
> ___
> 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: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
This is working for me but does fall apart when the field gets very small.
Also the font baselines change from Windows to both iOS and Android. Bug
12176 I have had many many variations of this task and this one is the best
I've found so far but I digress, I think there's bug because if the Yoda's
of LC can't get it right it's a bug.


Command CenterVert Obj -- for any control
   
   Local tMargins , tHeight , tFheight , tSpace

   put (0,0,0,0) into tMargins
   try
put item 1 of the margins of obj into item 1 of tMargins
put item 3 of the margins of obj into item 3 of tMargins
   catch SomeError
exit CenterVert -- Can't get margins?... do nothing
   end try
   put the height of obj into tHeight
   try
  put the effective formattedheight of char 1 to -1 of obj into tFheight
--for fields. Note the EFFECTIVE.
   catch SomeError
  try
 put the formattedheight of control obj2 into tFheight -- for
buttons
  catch SomeError
 exit CenterVert -- Can't get the text height?... do nothing
  end try
   end try
   
   if tFheight < tHeight then -- make top/bottom margins 0 if text is
clipped
  put tHeight - tFheight into tSpace
  put trunc(tspace/2) into tspace -- This trunc seemed to help at
extremes.
  put tspace into item 2 of tMargins
  put tspace into item 4 of tMargins
   end if
   
   set the margins of Obj to tMargins
   
end CenterVert

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread -hh
You are not talking about centering text vertically, which is solved, at
least for me. You are talking about text measurement, what may be
used for that but one is not forced to do so.

Text measurement has changed several times since LC 6 and will change
again with every new dot-release of LC 8 (and moreover will always have
unavoidable OS-related differences).



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Set-Text-to-the-Vertical-Center-of-the-field-tp4702965p4703014.html
Sent from the Revolution - User mailing list archive at Nabble.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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/2/2016 4:42 PM, Richard Gaskin wrote:

That one's just a longer version of Jacque's algo, which gets the
difference between the formatted height of the text from the field, and
set the topMargin to half of that.

That's logical and should work, but trying my version this morning and
later Jacque's and this one, all of them are a bit off and more than a
bit funky:  if you click the button multiple times the text moves up and
down in ever smaller increments before settling into a position that's
somewhat close the vertically centered, but too high in tall fields and
too low in short fields.


Okay, I think I have this partly figured out. I saw the same jiggling, 
but now that I know the margins are part of the formattedheight, it 
makes sense. On every click, the margins were reset and the 
formattedheight changed.


So the solution seems to be:

1 get the formattedheight of only the lines (which ignores the margins)
2 calculate the extra empty space above and below that text
3 divide the space in half to get a top margin
4 add in half the ascender/descender padding (about 33% of textheight)

I think...

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/2/2016 1:34 PM, Richard Gaskin wrote:

IMNSO if this can't be done in three lines using Jacque's method it's a
bug.

   put the formattedheight of line 1 to -1 of me into tTotalTextHt
   put ( ( the height of me - tTotalTextHt ) / 2) into tTopMargin
   set topmargin of me to tTopMargin

Logically that should work regardless of text size or fixedLineHeight.

Can anyone here think of a reason it might not be considered a bug?


If there's a bug, it appears to be that the current margins are part of 
the formattedheight, at least in LC 8. But it may not be a bug, I'm not 
sure. Setting the topmargin of a field to 0 gives a different 
formattedheight than a topmargin of a higher value (ditto setting 
bottomMargin or both.) So that's probably why getting the 
formattedheight of the lines instead of the whole field works better.


If my ascender/descender theory is right, then we need to add that 
clearance space back into the calculation. So:


on mouseUp
  put the effective textheight of me * .33 into tPadding
  put the formattedheight of line 1 to -1 of me into tTotalTextHt
  put ( ( the height of me - tTotalTextHt ) / 2) into tTopMargin
  set topmargin of me to tTopMargin + tPadding
end mouseUp

That seems to get us closer. I vaguely recall that the exact fraction of 
the textheight that's used for the padding was posted here a long time 
ago but I can't remember what it was, and .33 seems close.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/2/2016 4:09 PM, Sannyasin Brahmanathaswami wrote:

and this from Jacque


>The formattedheight of the entire field apparently isn't the same as the
>formattedheight of the totals of the lines.

makes no sense to me... or at least it would be good to know the difference in 
precise terms.


I'd guess it has to do with the extra clearance required by ascenders 
and decenders when calculating the minimum height needed to display the 
text in the field. There has to be a little extra space at both the top 
and bottom of the text block. When adding up just the specific lines, 
that extra calculation is omitted.


Just guessing though.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Set Text to the Vertical Center of the field

2016-04-02 Thread Scott Rossi
This has already been submitted at least a couple of times:

http://quality.livecode.com/show_bug.cgi?id=2707

http://quality.livecode.com/show_bug.cgi?id=9561


Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 4/2/16, 2:49 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami"

wrote:

>Can you submit? with your test stack?
>
>On April 2, 2016 at 11:42:43 AM, Richard Gaskin
>(ambassa...@fourthworld.com) wrote:
>
>So a bug report wouldn't be for any specific number of lines, but merely
>that either the topMargin and/or formattedHeight be fixed so it can be
>possible to apply good logic to get good results.
>___
>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: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin

Sannyasin Brahmanathaswami wrote:

> Can you submit? with your test stack?

It's physically possible, but I'm currently tracking many bugs related 
to my own work.


Is there something that prevents you from submitting a bug related to 
your work?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Set Text to the Vertical Center of the field

2016-04-02 Thread Sannyasin Brahmanathaswami
Can you submit? with your test stack?

On April 2, 2016 at 11:42:43 AM, Richard Gaskin 
(ambassa...@fourthworld.com) wrote:

So a bug report wouldn't be for any specific number of lines, but merely
that either the topMargin and/or formattedHeight be fixed so it can be
possible to apply good logic to get good results.
___
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: Script Only Stack Architecture

2016-04-02 Thread Richard Gaskin

Sannyasin Brahmanathaswami

> Kay C Lan wrote:
>>
>> IMO the ideal solution would be the Dictionary act like a Wiki
>> Editor.
>
> I had a parallel thought this morning. Many languages have their
> "wiki space"
>
> Given the enormity of the task of turning the dictionary into
> something like that...don't bother... let it be what it is. Just
> start a new empty wiki.
>
> Begin simply: As soon as subject arise of value, instantiate the
> subject / theme and put the info there.
>
> I would be happy to participate.

MaxV already started one - dive in:



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin

Sannyasin Brahmanathaswami wrote:

> Someone sent me this solution off line..
>
> on mouseUp
>   CenterTextVertically "field 2"
> end mouseUp
>
> on CenterTextVertically myFld
>   put the effective textHeight of myFld into tTextHeight
>   put item 2 of the loc of myFld into tfield
>   put the formattedRect of line 1 to - 1 of myFld into tFormatRect
>   put item 4 of tFormatRect - item 2 of tFormatRect into tFormatHeight
>   put tFormatHeight div 2 into tFormatHalfHeight
>   put item 2 of tFormatRect into tCurrFormatTop
>   put tfieldY - tCurrFormatTop into tCenterField_To_TopTextDiff
>   set the topMargin of myFld to the topMargin of myFld + 
tCenterField_To_TopTextDiff - tFormatHalfHeight

> end CenterTextVertically
>
> But, agreed, it should be a 3 liner  will you "bug it" for us?

The first executable line there sets a value in tTextHeight but doesn't 
use it later on, so it's really fewer lines than it appears. :)


The number of lines isn't as important as that it's possible.

That one's just a longer version of Jacque's algo, which gets the 
difference between the formatted height of the text from the field, and 
set the topMargin to half of that.


That's logical and should work, but trying my version this morning and 
later Jacque's and this one, all of them are a bit off and more than a 
bit funky:  if you click the button multiple times the text moves up and 
down in ever smaller increments before settling into a position that's 
somewhat close the vertically centered, but too high in tall fields and 
too low in short fields.


So a bug report wouldn't be for any specific number of lines, but merely 
that either the topMargin and/or formattedHeight be fixed so it can be 
possible to apply good logic to get good results.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Script Only Stack Architecture

2016-04-02 Thread Sannyasin Brahmanathaswami
Kay C Lan wrote:

IMO the ideal solution would be the Dictionary act like a Wiki Editor.


I had a parallel thought this morning. Many languages have their "wiki space"

Given the enormity of the task of turning the dictionary into something like 
that...don't bother... let it be what it is. Just start a new empty wiki.

Begin simply: As soon as subject arise of value, instantiate the subject / 
theme and put the info there.

I would be happy to participate. I probably would be better than what I do now: 
copy out and save snippets from email to files on disk...

So if you want to learn more about "behavior" just search the wiki... not the 
dictionary.

of course even managing a wiki is more over head for someone.
___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread Sannyasin Brahmanathaswami
 
Someone sent me this solution off line..


on mouseUp
CenterTextVertically "field 2"
end mouseUp


on CenterTextVertically myFld
put the effective textHeight of myFld into tTextHeight
put item 2 of the loc of myFld into tfield
put the formattedRect of line 1 to - 1 of myFld into tFormatRect
put item 4 of tFormatRect - item 2 of tFormatRect into tFormatHeight
put tFormatHeight div 2 into tFormatHalfHeight
put item 2 of tFormatRect into tCurrFormatTop
put tfieldY - tCurrFormatTop into tCenterField_To_TopTextDiff
set the topMargin of myFld to the topMargin of myFld + 
tCenterField_To_TopTextDiff - tFormatHalfHeight

end CenterTextVertically

But, agreed, it should be a 3 liner  will you "bug it" for us?

and this from Jacque

> The formattedheight of the entire field apparently isn't the same as the 
> formattedheight of the totals of the lines. 

makes no sense to me... or at least it would be good to know the difference in 
precise terms.


On April 2, 2016 at 8:34:25 AM, Richard Gaskin 
(ambassa...@fourthworld.com(mailto:ambassa...@fourthworld.com)) wrote:

> IMNSO if this can't be done in three lines using Jacque's method it's a bug.  
>  
> put the formattedheight of line 1 to -1 of me into tTotalTextHt  
> put ( ( the height of me - tTotalTextHt ) / 2) into tTopMargin  
> set topmargin of me to tTopMargin  
>  
> Logically that should work regardless of text size or fixedLineHeight.  
>  
> Can anyone here think of a reason it might not be considered a bug?
___
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: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Ive tried several of the methods discussed here and one of my own, and 
while some work at some field heights they break at others.


I didn't use fixedLineHeight because that shouldn't be needed; indeed I 
can imagine many cases in which a field may have different sizes of 
text, so we need a solution that allows that.


IMNSO if this can't be done in three lines using Jacque's method it's a bug.

  put the formattedheight of line 1 to -1 of me into tTotalTextHt
  put ( ( the height of me - tTotalTextHt ) / 2) into tTopMargin
  set topmargin of me to tTopMargin

Logically that should work regardless of text size or fixedLineHeight.

Can anyone here think of a reason it might not be considered a bug?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: File exists

2016-04-02 Thread RM



On 2.04.2016 20:53, Kay C Lan wrote:

On Sat, Apr 2, 2016 at 4:48 PM, JB  wrote:

If I open a file for read or write and the file does
not exist it will be created.

Just to clarify, that statement is incorrect.

If you open a file for 'write' and the file does not exist, it will be created.

if you open a file for 'read' and the file does not exist 'the result'
will be "can't open that file" and NO file is created.

on mouseUp
set the defaultFolder to specialFolderPath("documents")
open file "this is a test.lcdoc" for read
if  (the result is "can't open that file") then
   --check if a file was created
   if (there is a file "this is a test.lcdoc") then
  answer "A file was created!"
   else
  answer "The file was NOT created."
   end if
else
   answer "You can read from it now!"
end if
end mouseUp

Please also note that Richmond's example is misleading. If you use
'read from file' without first using  'open file' then regardless of
whether the file exists or not, 'it' will always be empty.


Whoops: sorry about that one.

Richmond.



___
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: LiveCode Video Display with QuickTime on a PC ?

2016-04-02 Thread Francis Nugent Dixon
Hi from Beautiful Brittany,

Thanks to Mark and Jacqueline, and especially Panos for adding AVI
clarification, and again to Stephen for completing the PC issue.

I now know how to solve all elements of this problem !

If QT (V7) works on XP PC versions, that solves my immediate
problem, but the rest of the data is stored for future use ..

Thanks to you all.

-Francis

___
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: Stripping

2016-04-02 Thread Klaus major-k
Hi Jaqueline,

> Am 02.04.2016 um 20:00 schrieb J. Landman Gay :
> 
> On 4/2/2016 12:44 PM, Klaus major-k wrote:
>> yep, but the CRs had been in his database records and not (yet) in Livecode!
>> So he did not understand the real problem at that point.
> And he still doesn't. Maybe I'll go poke him a little bit more.

sounds like a good idea to me! :-D

> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Stripping

2016-04-02 Thread J. Landman Gay

On 4/2/2016 12:44 PM, Klaus major-k wrote:

yep, but the CRs had been in his database records and not (yet) in Livecode!
So he did not understand the real problem at that point.


And he still doesn't. Maybe I'll go poke him a little bit more.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/2/2016 12:54 PM, J. Landman Gay wrote:

On 4/1/2016 11:08 PM, Sannyasin Brahmanathaswami wrote:

on mouseup
set the textsize of me to 28
put the formattedheight of me into tTotalTextHeight
put ( ( the height of me - tTotalTextHeight ) / 2) into tTopBottomMargins
set topmargin of me to tTopBottomMargins
end mouseUp

But it doesn't and the vertical position varies depending on the
number of lines.


Try this:

on verticalAlign
   put the formattedheight of line 1 to -1 of me into tTotalTextHeight
   put ( ( the height of me - tTotalTextHeight ) / 2) into
tTopBottomMargins
   set topmargin of me to tTopBottomMargins
end verticalAlign

The formattedheight of the entire field apparently isn't the same as the
formattedheight of the totals of the lines. At least, the above worked
in my limited test.



BTW, I set the fixedlineheight of the field to true.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay

On 4/1/2016 11:08 PM, Sannyasin Brahmanathaswami wrote:

on mouseup
set the textsize of me to 28
put the formattedheight of me into tTotalTextHeight
put ( ( the height of me - tTotalTextHeight ) / 2) into tTopBottomMargins
set topmargin of me to tTopBottomMargins
end mouseUp

But it doesn't and the vertical position varies depending on the number of 
lines.


Try this:

on verticalAlign
  put the formattedheight of line 1 to -1 of me into tTotalTextHeight
  put ( ( the height of me - tTotalTextHeight ) / 2) into tTopBottomMargins
  set topmargin of me to tTopBottomMargins
end verticalAlign

The formattedheight of the entire field apparently isn't the same as the 
formattedheight of the totals of the lines. At least, the above worked 
in my limited test.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: File exists

2016-04-02 Thread Kay C Lan
On Sat, Apr 2, 2016 at 4:48 PM, JB  wrote:
> If I open a file for read or write and the file does
> not exist it will be created.

Just to clarify, that statement is incorrect.

If you open a file for 'write' and the file does not exist, it will be created.

if you open a file for 'read' and the file does not exist 'the result'
will be "can't open that file" and NO file is created.

on mouseUp
   set the defaultFolder to specialFolderPath("documents")
   open file "this is a test.lcdoc" for read
   if  (the result is "can't open that file") then
  --check if a file was created
  if (there is a file "this is a test.lcdoc") then
 answer "A file was created!"
  else
 answer "The file was NOT created."
  end if
   else
  answer "You can read from it now!"
   end if
end mouseUp

Please also note that Richmond's example is misleading. If you use
'read from file' without first using  'open file' then regardless of
whether the file exists or not, 'it' will always be empty.

___
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: Stripping

2016-04-02 Thread Klaus major-k
Hi Richmond,

> ...
 reading the thread may help! 8-)
>>> I read the thread.  The method in my stack can just as easily be used with 
>>> a string that is going into a datagrid.
>> yep, but that really has nothing to do with the problem discussed in the 
>> thread.
> 
> I answered the chap's first post: he stated that "The problem is how to keep 
> the whole contents in one field so that
> the returns don't cause it to go to the next Description field.“

yep, but the CRs had been in his database records and not (yet) in Livecode!
So he did not understand the real problem at that point.

> So, if the returns are stripped out of the textString that SHOULD solve the 
> problem mentioned in that quote.
> It is possible that everything follows from the fact that the chap was not 
> removing the returns effectively.

Whatever, I am really tired of explaining the actual problem!

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Stripping

2016-04-02 Thread RM



On 2.04.2016 20:33, Klaus major-k wrote:

Hi Richmond,


Am 02.04.2016 um 19:30 schrieb RM :

On 2.04.2016 20:27, Klaus major-k wrote:

Hi Richmond,


Am 02.04.2016 um 19:20 schrieb RM :

There's been a bit of a "Hoo Haa" on the Forum about stripping out carriage 
returns:
http://forums.livecode.com/viewtopic.php?f=7=26929=140516#p140516
I'm not sure why.

reading the thread may help! 8-)

I read the thread.  The method in my stack can just as easily be used with a 
string that is going into a datagrid.

yep, but that really has nothing to do with the problem discussed in the thread.


I answered the chap's first post: he stated that "The problem is how to 
keep the whole contents in one field so that

the returns don't cause it to go to the next Description field."

So, if the returns are stripped out of the textString that SHOULD solve 
the problem mentioned in that quote.


It is possible that everything follows from the fact that the chap was 
not removing the returns effectively.


Richmond.




Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Stripping

2016-04-02 Thread Klaus major-k
Hi Richmond,

> Am 02.04.2016 um 19:30 schrieb RM :
> 
> On 2.04.2016 20:27, Klaus major-k wrote:
>> Hi Richmond,
>> 
>>> Am 02.04.2016 um 19:20 schrieb RM :
>>> 
>>> There's been a bit of a "Hoo Haa" on the Forum about stripping out carriage 
>>> returns:
>>> http://forums.livecode.com/viewtopic.php?f=7=26929=140516#p140516
>>> I'm not sure why.
>> reading the thread may help! 8-)
> I read the thread.  The method in my stack can just as easily be used with a 
> string that is going into a datagrid.

yep, but that really has nothing to do with the problem discussed in the thread.

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Stripping

2016-04-02 Thread RM



On 2.04.2016 20:27, Klaus major-k wrote:

Hi Richmond,


Am 02.04.2016 um 19:20 schrieb RM :

There's been a bit of a "Hoo Haa" on the Forum about stripping out carriage 
returns:
http://forums.livecode.com/viewtopic.php?f=7=26929=140516#p140516
I'm not sure why.

reading the thread may help! 8-)


I read the thread.  The method in my stack can just as easily be used 
with a string that is going into a datagrid.


Richmond.




Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: Stripping

2016-04-02 Thread Klaus major-k
Hi Richmond,

> Am 02.04.2016 um 19:20 schrieb RM :
> 
> There's been a bit of a "Hoo Haa" on the Forum about stripping out carriage 
> returns:
> http://forums.livecode.com/viewtopic.php?f=7=26929=140516#p140516
> I'm not sure why.

reading the thread may help! 8-)

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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


Stripping

2016-04-02 Thread RM
There's been a bit of a "Hoo Haa" on the Forum about stripping out 
carriage returns:


http://forums.livecode.com/viewtopic.php?f=7=26929=140516#p140516

I'm not sure why.

Richmond.

___
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: PDF text extraction?

2016-04-02 Thread RM



On 2.04.2016 20:03, Dr. Hawkins wrote:

On Sat, Apr 2, 2016 at 8:55 AM, RM  wrote:


I know that Supercard has been around for donkey's ages (recall playing
with it [and finding it
rather awkward compared with Hypercard 2.4.1] about 20 years ago),


I switched my projects from Hypercard 1 to Supercard 1.5 long ago, for no
other reason than multiple windows--which I desperately needed.

I moved some back to Hypercard 2.0, but that involved a copy/paste of every
script, iirc. Whatever it was, it was an insane amount of manual cop/paste
. . .




We've all done daft things in the past.

Currently I cannot cope with all the daft things I've done in the past: 
I'm far too busy coping with

the daft things I'm doing at the moment.

Love, Richmond.

___
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: PDF text extraction?

2016-04-02 Thread Dr. Hawkins
On Sat, Apr 2, 2016 at 8:55 AM, RM  wrote:

> I know that Supercard has been around for donkey's ages (recall playing
> with it [and finding it
> rather awkward compared with Hypercard 2.4.1] about 20 years ago),
>

I switched my projects from Hypercard 1 to Supercard 1.5 long ago, for no
other reason than multiple windows--which I desperately needed.

I moved some back to Hypercard 2.0, but that involved a copy/paste of every
script, iirc. Whatever it was, it was an insane amount of manual cop/paste
. . .


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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: PDF text extraction?

2016-04-02 Thread RM



On 2.04.2016 19:17, Richard Gaskin wrote:

Richmond wrote:

> On 2.04.2016 18:38, Richard Gaskin wrote:
>> Thanks. Yes, Mark Lucas has been doing some outstanding work on
>> SuperCard 4.8.
>
> Well, outstanding is as outstanding does, I really wonder how
> Supercard keeps going in the face of competition of Livecode.
> I know that Supercard has been around for donkey's ages (recall
> playing with it [and finding it rather awkward compared with
> Hypercard 2.4.1] about 20 years ago), but as Macintosh, whichever
> way one looks at things, is a coterie, niche market, a multiplatform
> alternative (pace Livecode) would seem to make it redundant.

One could equally ask about LiveCode in the face of competition from 
the nearly-ubiquitous Python.  There are so many languages in the 
world because each offers something a little different from the others.


I compared Supercard and Livecode because, I at least, see them as 
belonging to a family of languages that include things like Toolbook as 
well, to which
Python does not belong: a family of programming languages with an 
integrated compiler and a WYSYWIG GUI.




Given the similarities between LC and SC, it might seem at first 
glance like they do the same thing, and in some respects they do.


But when you spend more time with them, it becomes clear that the 
similarities between them are like the similarities between Mac and 
Windows:  both have overlapping windows and many other nearly 
identical GUI elements, but Mac is built by a company that also makes 
the hardware so they're able to exercise a bit more control over the 
experience, one which its fans feel is more integrated and satisfying.


What that really means is that the Livecode people have to work quite a 
lot harder feature-per-feature than the Supercard people.




Similarly, SuperCard has 1/7th of the job that LC has: OS X vs OS X, 
Windows, Linux, iOS, Android, Linux/ARM, and faceless Server. Not 
surprisingly, focused exclusively on 1/7th of the platform coverage, 
Mark Lucas has been able to integrate with OS X more smoothly in some 
ways than LC can.


SuperCard is a glove wrapped around the hand of OS X, while LC is more 
of a platform-independent VM, interfacing with the host OSes in such a 
broad range of ways that it has to use more internal code for things 
SC can depend on OS X for.


They look similar because both do a good job, but under the hood their 
architectures are vastly different, each comprised of good choices but 
different because they serve very different goals.


The sabre-toothed tiger that roamed across Europe, and the sabre-toothed 
marsupial tiger that roamed across South America had
vastly different interior workings, even if, superficially, they looked 
almost identical.


Neither would have survived long in the other's habitat.




> In a perfect world (which is a silly turn of phrase) Livecode would
> be able to parse just about any file one could chuck at it.

That's the world I hope we're moving toward.  And format by format 
we'll get there.


Right now most data scientists use Python as their glue language to 
wrangle Hadoop, R, and the other parts of their workflow.


Data handling is not Livecode's greatest strength at the moment: I think 
it is, despite some naysayyers, still the Hypercard "thing".


If Livecode wants to be a man for all seasons then there are quite a few 
areas which need close attention.  I have sufficient confidence
in Livecode to believe that their team is capable of that (or, if they 
are not, at least seeing that and hiring extra people who are capable of 
that).


There's really no reason they couldn't be using LiveCode in that role, 
and it becomes a compellingly self-evident choice once we can move 
some of that workflow directly into the language through automated 
handling of more formats.




I have children who attend my language school who cannot understand why 
the High schools in this country teach teenagers programming
using either PASCAL (!) or C++ when  Livecode produces results far 
faster while not dumbing things down to the extent that one ends up with

a LEGO-kit.

The reasons in Bulgaria are both historical and due to the low-pay = 
low-motivation-to-change given to school teachers.


This summer I am going to have an "innovative" class consisting of 14-16 
year olds who have been studying C++, and we are going
to duplicate, over a 6 week period (2 or 3 times a week) all the 
projects they have had to work on in 2 years. I intend to record these 
projects
(probably write up the projects as they are presented in the kids' 
textbooks) as a sort of "nyaah, nyahh, nyaah" to the extremely stuffy 
and conservative
state educational system here. Ideally this will end up as a sort of 
monograph; both in English and Bulgarian.


Richmond.

Richmond.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 

Re: PDF text extraction?

2016-04-02 Thread Richard Gaskin

Richmond wrote:

> On 2.04.2016 18:38, Richard Gaskin wrote:
>> Thanks. Yes, Mark Lucas has been doing some outstanding work on
>> SuperCard 4.8.
>
> Well, outstanding is as outstanding does, I really wonder how
> Supercard keeps going in the face of competition of Livecode.
> I know that Supercard has been around for donkey's ages (recall
> playing with it [and finding it rather awkward compared with
> Hypercard 2.4.1] about 20 years ago), but as Macintosh, whichever
> way one looks at things, is a coterie, niche market, a multiplatform
> alternative (pace Livecode) would seem to make it redundant.

One could equally ask about LiveCode in the face of competition from the 
nearly-ubiquitous Python.  There are so many languages in the world 
because each offers something a little different from the others.


Given the similarities between LC and SC, it might seem at first glance 
like they do the same thing, and in some respects they do.


But when you spend more time with them, it becomes clear that the 
similarities between them are like the similarities between Mac and 
Windows:  both have overlapping windows and many other nearly identical 
GUI elements, but Mac is built by a company that also makes the hardware 
so they're able to exercise a bit more control over the experience, one 
which its fans feel is more integrated and satisfying.


Similarly, SuperCard has 1/7th of the job that LC has: OS X vs OS X, 
Windows, Linux, iOS, Android, Linux/ARM, and faceless Server.  Not 
surprisingly, focused exclusively on 1/7th of the platform coverage, 
Mark Lucas has been able to integrate with OS X more smoothly in some 
ways than LC can.


SuperCard is a glove wrapped around the hand of OS X, while LC is more 
of a platform-independent VM, interfacing with the host OSes in such a 
broad range of ways that it has to use more internal code for things SC 
can depend on OS X for.


They look similar because both do a good job, but under the hood their 
architectures are vastly different, each comprised of good choices but 
different because they serve very different goals.



> In a perfect world (which is a silly turn of phrase) Livecode would
> be able to parse just about any file one could chuck at it.

That's the world I hope we're moving toward.  And format by format we'll 
get there.


Right now most data scientists use Python as their glue language to 
wrangle Hadoop, R, and the other parts of their workflow.  There's 
really no reason they couldn't be using LiveCode in that role, and it 
becomes a compellingly self-evident choice once we can move some of that 
workflow directly into the language through automated handling of more 
formats.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Script Only Stack Architecture

2016-04-02 Thread Richard Gaskin

Kay C Lan wrote:

And now stepping on very thin ice I will go against the grain of 'User
Notes' as previously implemented and currently re-suggested. Again, as
an interim step I see them as very useful for capturing nuggets of
information. The great thing about them is, as stated by Jacque, you
don't need to learn any markup (or Git), and you can (could) do it
immediately.

IMO the ideal solution would be the Dictionary act like a Wiki Editor.
Those with Contributor Accounts get Edit buttons in each of the
relevant sections of each Dictionary entry. You want to add an
excellent example, then you click the Example section Edit button and
you add it right there, where it should be, and where it will be
automatically colour coded; not at the bottom of a dozen other
people's User Notes in lost black and white. You have a Warning,
Caution or Tip that needs highlighting, then that is how it's
presented; again not hidden amongst other User Notes in the same bland
font. Also, a one line Example entry would be just that, a one line
entry. The User Note format bloats it out with inclusion of who added
it, and a time stamp and a couple of blank lines around the entry so a
single line of relevance takes up 4 or 5 lines of Dictionary screen
space. I personally don't need my name attached to every contribution
I make - for those that do, maybe a list of Doc Contributor names in
the About Livecode box similar to the list of names of LC Community
contributors that currently appears.

The Dictionary is really only a glorified Wiki. I suspect most people
believe the success of Wikis is due to community contribution, but I
believe just as important is Wikis FORCE a standard format and
presentation, everything in it's right place, everything found where
it should be. I think one of the problems Richard alludes to re bloat
can be avoided if people are forced to think where exactly in the
Dictionary entry structure does my nugget of information fit in and
how do I word it so it does fit with the paragraph before and after.
As a bonus, you can also quickly correct that minor spelling error in
the preceding paragraph.

The Dictionary is just another Livecode stack, so this is all possible
with the talent and technology we have in front of us, the hardest
thing to implement would be the Git integration so that each
addition/amendment is vetted before inclusion with the next release
and visible to the rest of us.

Actually the biggest problem is who(s) is going to do build it. I
believe the Team is still looking for a Community Docs advocate/leader
to corral those with such inclinations and ideas. The reality is the
former idea of User Notes is probably a lot easier/quicker to
implement than turning the Dictionary into an .lcdoc Editor/Git
Integrator.

I should probably keep my big mouth shut from now on as the ice has
surely broken and I'm in very deep water.


Au contraire.  I've quoted the meat of that post intact, long as it is, 
because I feel it merits a second read.  It's a very good collection of 
ideas which, if implemented, could greatly streamline community 
contributions to the Dictionary.


And like the rest of the clarity expressed there, you hit the hardest 
part spot-on:


   Actually the biggest problem is who(s) is going to do build it.

A project of this scope would be a considerable undertaking.  The team 
could do it, but it would need to go into queue after the current 
objectives and the rest of the Kickstarter goals, so let's politely just 
file that notion under "Not Soon". :)


The community could do it, but finding the intersection of interest, 
skill, and available time would be at best very difficult.  It's not 
like one of the joyous one-offs we toss together, like Richmond's IDE 
mods or my 20-line script that makes revMenubar look more Ubuntu-like. 
This is a big task, big enough to warrant a team and a Gantt chart.


Conceiving such a system is brilliant but takes only a few minutes to 
draft an outline like the one above.  Drafting a functional spec and 
workplan would take much more time, and coding it, testing it, and 
building maintenance systems for it would be a pretty hefty commitment.


All of it is indeed very achievable in LiveCode.  The project I work on 
for emergency medicine is similar in scope, and all of it -- from the 
client to the server all the way down to the data store and Web 
publishing subsystem -- was built entirely in LiveCode.  But it was 
funded by a fairly large company with a clear upside for the investment.


Here the ROI is arguably strong but not quite as strong, when we 
consider that Github's Markdown is fairly easy to learn and can be used 
gracefully in any text editor, even their online form.


So I like the idea.  Very much.  And if we can get resources who could 
commit to seeing it through I'd love to work with it.  But the ROI may 
be difficult to justify, as it would require a lot of people's time away 
from other activities.


--
 Richard Gaskin
 Fourth 

Re: PDF text extraction?

2016-04-02 Thread RM



On 2.04.2016 18:38, Richard Gaskin wrote:

Richmond wrote:


I see that Supercard, in their 4.8 Beta have introduced these:

rtfToText - extracts text from an RTF or RTFD file
pdfToText - extracts text from a PDF file
docToText - extracts text from a Microsoft Word file
docxToText - extracts text from a Microsoft Word XML file
htmlToText - extracts text from an HTML file
webarchiveToText - extracts text from a WebArchive file
http://forums.supercard.us/viewtopic.php?f=11=2115=10705=pdf#p10705 



However, as I have just joined the Supercard Forum [for the only reason
to get a copy of the Beta] this will take a few days to come through.

Richard Gaskin should not have to wait:
http://solutionsetcetera.com/betarequest.html

Of course, as Supercard is Macintosh only I suspect
these features are leveraging Mac-only features; although they
do look very UNIX/Linux like in their naming method.


Thanks. Yes, Mark Lucas has been doing some outstanding work on 
SuperCard 4.8.


Well, outstanding is as outstanding does, I really wonder how Supercard 
keeps going in the

face of competition of Livecode.

I know that Supercard has been around for donkey's ages (recall playing 
with it [and finding it
rather awkward compared with Hypercard 2.4.1] about 20 years ago), but 
as Macintosh, whichever way one
looks at things, is a coterie, niche market, a multiplatform alternative 
(pace Livecode) would seem

to make it redundant.



But being exclusively for OS X, as much as I've enjoyed trying out 
those enhancements on my Mac I can't use them on the platform I spend 
most of my time on (Ubuntu), or the one most of my users spend time on 
(Windows).  Mr. Lucas is, to put it politely, not fond of the Windows 
API, and has no interest in Linux, so I don't see that changing 
anytime soon.


I may have a lead on a long-term multi-plat solution, and for now I 
can get through the first batch of a thousand or so PDFs I need to 
work with using the pdftotext command line tool included in Ubuntu.


Yes, batch processing of PDF to text is easy enough (although the 
standard of end results may vary) on Linux; but it is not

an in-built solution in Livecode.

In a perfect world (which is a silly turn of phrase) Livecode would be 
able to parse just about any file one could chuck

at it.



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.com http://www.FourthWorld.com



Richmond.

___
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: Design Challenge -- Round Corner mask on images

2016-04-02 Thread Alejandro Tejada
Hi Richmond,


RM wrote
> Why bother? Frankly the process is no more difficult using
> GIMP:  https://www.gimp.org/downloads/ or
> Photoshop: http://www.adobe.com/products/photoshop.html
> and there are quite a few other image editing software packages
> available that can do that job as well.

True. I will update my stack palette 
"mask bitmap 02"... when I find time. :-D

Alejandro



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Design-Challenge-Round-Corner-mask-on-images-tp4702659p4702982.html
Sent from the Revolution - User mailing list archive at Nabble.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: PDF text extraction?

2016-04-02 Thread RM

I see that Supercard, in their 4.8 Beta have introduced these:

rtfToText - extracts text from an RTF or RTFD file

pdfToText - extracts text from a PDF file

docToText - extracts text from a Microsoft Word file

docxToText - extracts text from a Microsoft Word XML file

htmlToText - extracts text from an HTML file

webarchiveToText - extracts text from a WebArchive file

http://forums.supercard.us/viewtopic.php?f=11=2115=10705=pdf#p10705

However, as I have just joined the Supercard Forum [for the only reason 
to get a copy of the Beta]

this will take a few days to come through.

Richard Gaskin should not have to wait:

http://solutionsetcetera.com/betarequest.html

Of course, as Supercard is Macintosh only I suspect
these features are leveraging Mac-only features; although they
do look very UNIX/Linux like in their naming method.

Richmond.
___
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: PDF text extraction?

2016-04-02 Thread RM

http://use-livecode.runrev.narkive.com/1agaImsm/in-search-of-the-lonesome-yodel-pdf

Another old chestnut . . .

Richmond.

On 1.04.2016 03:47, Richard Gaskin wrote:
I may need to extract text from a fair number of PDFs (hundreds).  I 
can find all sorts of third-party tools to do that, many of them free 
and easy to use, but I'd prefer to integrate this step into some other 
things I need to do with the files.


The format isn't as simple as Word or docx, though.  I'm not even sure 
if we have support in LC for the compression used in the text streams. 
Lots of parts there.


Anyone here have a library or external for extracting text from PDFs? 
Ideally a good solution would be available for Win, Mac, and Linux.


TIA -




___
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: Difficulty using Livecode.com

2016-04-02 Thread Sri
I wish LC would consider reorganizing its website to display a multi-stage
nested menu on its main page. It may be complex to create (and maintain),
but it would give visitors (new and repeat) a bird's eye view and a way to
quickly go where they want. I know nested menus are frowned upon by web
design gurus, but I think it will add to the LC website's usability.

Regards,
Sri



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Difficulty-using-Livecode-com-tp4702909p4702976.html
Sent from the Revolution - User mailing list archive at Nabble.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: Design Challenge -- Round Corner mask on images

2016-04-02 Thread RM

Why bother?

Frankly the process is no more difficult using

GIMP:  https://www.gimp.org/downloads/

or

Photoshop: http://www.adobe.com/products/photoshop.html

and there are quite a few other image editing software packages
available that can do that job as well.

Richmond.

On 1.04.2016 02:46, Alejandro Tejada wrote:

Great! :D

Now the big question :D

Who volunteer to build (and maintain) a plug-in
(palette or modeless stack) that explains and
create the many ways of masking an image:

1) Group with an image and graphic
(using inks effects)

2) Image and graphic or
Image and Transparent Image
(using snapshot)

3) Image and grahic
(using backpattern and script)

Just one more thing:
In the "About" card of this
plug-in, post links to each
one of these threads from
the mail list and forum.

Thanks in advance!

Alejandro






___
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: File exists

2016-04-02 Thread JB
Thank you, Richmond!
Your help is always appreciated.

JB



> On Apr 2, 2016, at 2:03 AM, RM  wrote:
> 
> Richmond.

___
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: File exists

2016-04-02 Thread JB
I LIKE THAT!

thank you very much.

JB



> On Apr 2, 2016, at 2:00 AM, Thierry Douez  wrote:
> 
> Hi,
> 
> there is a file ".."
> 
> HTH,
> 
> Thierry
> 
> 
> 2016-04-02 10:48 GMT+02:00 JB :
> 
>> If I open a file for read or write and the file does
>> not exist it will be created.  Is there a way to see
>> if the file exists before opening it?  I do not want
>> a file to be created if it does not exist.  I guess I
>> could check the creation date and if it was just
>> created then delete it but I was wondering if there
>> is a better way.
>> 
>> JB
>> 
> -- 
> 
> Thierry Douez - http://sunny-tdz.com
> sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
> ___
> 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: File exists

2016-04-02 Thread RM

Naively I tried this in a button:

on mouseUp
   if exists(file "HereWeGo.txt") then
  open file "HereWeGo.txt" for write
   else
  put "no such file"
  end if
end mouseUp

AND the thing didn't work because 'exists' only works for objects within 
Livecode.


BUT this seems a reasonable way to check for a file's existence:

on mouseUp
  read from file "HereWeGo.txt" for 1 line
  if it is empty then
 put "no such file"
 end if
end mouseUp

Richmond.

On 2.04.2016 11:48, JB wrote:

If I open a file for read or write and the file does
not exist it will be created.  Is there a way to see
if the file exists before opening it?  I do not want
a file to be created if it does not exist.  I guess I
could check the creation date and if it was just
created then delete it but I was wondering if there
is a better way.

JB





___
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: File exists

2016-04-02 Thread Thierry Douez
Hi,

there is a file ".."

HTH,

Thierry


2016-04-02 10:48 GMT+02:00 JB :

> If I open a file for read or write and the file does
> not exist it will be created.  Is there a way to see
> if the file exists before opening it?  I do not want
> a file to be created if it does not exist.  I guess I
> could check the creation date and if it was just
> created then delete it but I was wondering if there
> is a better way.
>
> JB
>
-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: File exists

2016-04-02 Thread -=>JB<=-
Files will do it;
I forget so easily.

JB



> On Apr 2, 2016, at 1:48 AM, JB  wrote:
> 
> If I open a file for read or write and the file does
> not exist it will be created.  Is there a way to see
> if the file exists before opening it?  I do not want
> a file to be created if it does not exist.  I guess I
> could check the creation date and if it was just
> created then delete it but I was wondering if there
> is a better way.
> 
> JB
> 
> ___
> 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


File exists

2016-04-02 Thread JB
If I open a file for read or write and the file does
not exist it will be created.  Is there a way to see
if the file exists before opening it?  I do not want
a file to be created if it does not exist.  I guess I
could check the creation date and if it was just
created then delete it but I was wondering if there
is a better way.

JB

___
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: Why isn't isoToMac anymore needed with LC 8 custom props?

2016-04-02 Thread Kay C Lan
On Fri, Apr 1, 2016 at 5:42 PM, Tiemo Hollmann TB  wrote:
>  Am I right, that the text now is stored in Unicode in the
> custom property, when I save the file on windows and therefore I don't have
> to translate it anymore on Mac,

If by file you mean LC stack file then you're OK. If by file you mean
some other external document that your read from/write to, then you
should be aware of this Dictionary entry - see textEncode or
textDecode:

It is highly recommended that any time you interface with things
outside LiveCode (files, network sockets, processes, [databases] etc)
that you explicitly textEncode any text you send outside LiveCode and
textDecode all text received into LiveCode. If this doesn't happen, a
platform-dependent encoding will be used (which normally does not
support Unicode text).

___
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: Script Only Stack Architecture

2016-04-02 Thread Kay C Lan
On Sat, Apr 2, 2016 at 9:45 AM, Sannyasin Brahmanathaswami
 wrote:
> How do we do that. Via Git hub? we pull the entry edit and then push back 
> with changes?
>
Those who want to contribute will find Ali's guide essential:

https://github.com/livecode/livecode/blob/community-docs/docs/contributing_to_docs.md

Richard has also linked a couple of times to this Blog post which
links to the above:

https://livecode.com/putting-the-you-in-documentation/

And now stepping on very thin ice I will go against the grain of 'User
Notes' as previously implemented and currently re-suggested. Again, as
an interim step I see them as very useful for capturing nuggets of
information. The great thing about them is, as stated by Jacque, you
don't need to learn any markup (or Git), and you can (could) do it
immediately.

IMO the ideal solution would be the Dictionary act like a Wiki Editor.
Those with Contributor Accounts get Edit buttons in each of the
relevant sections of each Dictionary entry. You want to add an
excellent example, then you click the Example section Edit button and
you add it right there, where it should be, and where it will be
automatically colour coded; not at the bottom of a dozen other
people's User Notes in lost black and white. You have a Warning,
Caution or Tip that needs highlighting, then that is how it's
presented; again not hidden amongst other User Notes in the same bland
font. Also, a one line Example entry would be just that, a one line
entry. The User Note format bloats it out with inclusion of who added
it, and a time stamp and a couple of blank lines around the entry so a
single line of relevance takes up 4 or 5 lines of Dictionary screen
space. I personally don't need my name attached to every contribution
I make - for those that do, maybe a list of Doc Contributor names in
the About Livecode box similar to the list of names of LC Community
contributors that currently appears.

The Dictionary is really only a glorified Wiki. I suspect most people
believe the success of Wikis is due to community contribution, but I
believe just as important is Wikis FORCE a standard format and
presentation, everything in it's right place, everything found where
it should be. I think one of the problems Richard alludes to re bloat
can be avoided if people are forced to think where exactly in the
Dictionary entry structure does my nugget of information fit in and
how do I word it so it does fit with the paragraph before and after.
As a bonus, you can also quickly correct that minor spelling error in
the preceding paragraph.

The Dictionary is just another Livecode stack, so this is all possible
with the talent and technology we have in front of us, the hardest
thing to implement would be the Git integration so that each
addition/amendment is vetted before inclusion with the next release
and visible to the rest of us.

Actually the biggest problem is who(s) is going to do build it. I
believe the Team is still looking for a Community Docs advocate/leader
to corral those with such inclinations and ideas. The reality is the
former idea of User Notes is probably a lot easier/quicker to
implement than turning the Dictionary into an .lcdoc Editor/Git
Integrator.

I should probably keep my big mouth shut from now on as the ice has
surely broken and I'm in very deep water.

___
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