Re: Set font dynamically to fit text

2019-10-12 Thread hh via use-livecode
In the repeat loop set the attributes of the empty field and use measureText 
(or measureUnicodeText) to compute the textSize. As a last step fill the field.
___
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 font dynamically to fit text

2019-10-12 Thread Sannyasin Brahmanathaswami via use-livecode
But "line breaks" is another known factor, based on X… which still leaves us on 
variable to find.

Brian wrote:
You probably could get close with math but line breaks would not be uniform and 
will introduce variability.  You could probably get it down to 2 or 3 checks.

BR: Hmm I figured that a repeat loop would do that, but was look for a 
"one-off-equation"

According to the "laws of math" (ha... algebrait has been such a long time; 
I could be wrong) if you have single unknown variable , X, and all others are 
known factors, you would, in theory, be able to work out X "in one go."
The [number of characters, in a given font size/face, that can fit on one line 
of the field with a given length] is, in theory, among "what can be the known"

These little repeat loops are costly on mobile

Paul wrote:
your essentially want a repeat loop where you reduce the textSize of
char 1 to -1 of the field until the formattedHeight of the field is less
than or equal to the height of the field

You probably will need a condition in the loop to prevent the textSize
from going below 9

BR question
Assuming one is not putting whole pages into small fields, does any one have an 
efficient run time LC algorithm that will set the font size so that the 
formatted text will all appear in the field without needing to scroll?

BR

___
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 font dynamically to fit text

2019-10-12 Thread Brian Milby via use-livecode
You probably could get close with math but line breaks would not be uniform and 
will introduce variability.  You could probably get it down to 2 or 3 checks.

Thanks,
Brian
On Oct 12, 2019, 11:02 PM -0400, Sannyasin Brahmanathaswami via use-livecode 
, wrote:
> BR: Hmm I figured that a repeat loop would do that, but was look for a 
> "one-off-equation"
>
> According to the "laws of math" (ha... algebrait has been such a long 
> time; I could be wrong) if you have single unknown variable , X, and all 
> others are known factors, you would, in theory, be able to work out X "in one 
> go."
> The [number of characters, in a given font size/face, that can fit on one 
> line of the field with a given length] is, in theory, among "what can be the 
> known"
>
> These little repeat loops are costly on mobile
>
> Paul wrote:
> your essentially want a repeat loop where you reduce the textSize of
> char 1 to -1 of the field until the formattedHeight of the field is less
> than or equal to the height of the field
>
> You probably will need a condition in the loop to prevent the textSize
> from going below 9
>
> BR question
> Assuming one is not putting whole pages into small fields, does any one have 
> an efficient run time LC algorithm that will set the font size so that the 
> formatted text will all appear in the field without needing to scroll?
>
> BR
>
>
>
> ___
> 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 font dynamically to fit text

2019-10-12 Thread Sannyasin Brahmanathaswami via use-livecode
BR: Hmm I figured that  a repeat loop would do that, but was look for a 
"one-off-equation" 

According to the "laws  of math" (ha... algebrait has been 
such a long time; I could be wrong) if you have single unknown variable , X, 
and all others are known factors, you would, in theory, be able to work out X 
"in one go."
The [number of characters, in a given font size/face, that can 
fit on one line of the field with a given length] is, in theory,  among "what 
can be the known"

These little repeat loops are costly on mobile

Paul wrote:
your essentially want a repeat loop where you reduce the textSize of 
char 1 to -1 of the field until the formattedHeight of the field is less 
than or equal to the height of the field

You probably will need a condition in the loop to prevent the textSize 
from going below 9

BR question
Assuming one is not putting whole pages into small fields, does any one 
have an efficient run time LC algorithm that will set the font size so that the 
formatted text will all appear in the field without needing to scroll?

BR



___
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 font dynamically to fit text

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

On 10/12/2019 8:20 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

Assuming one is not putting whole pages into small fields, does any one have an 
efficient run time LC algorithm that will set the font size so that the 
formatted text will all appear in the field without needing to scroll?

BR

Satchiai Iru - Be a Witness
___
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



your essentially want a repeat loop where you reduce the textSize of 
char 1 to -1 of the field until the formattedHeight of the field is less 
than or equal to the height of the field


You probably will need a condition in the loop to prevent the textSize 
from going below 9


___
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


Set font dynamically to fit text

2019-10-12 Thread Sannyasin Brahmanathaswami via use-livecode
Assuming one is not putting whole pages into small fields, does any one have an 
efficient run time LC algorithm that will set the font size so that the 
formatted text will all appear in the field without needing to scroll?

BR

Satchiai Iru - Be a Witness
___
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


launch & quit

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

I have a stand alone with a card with a button with a mouseUp handler

on mouseUp

  -- some stuff

  -- tApplication variable contains a path to another standalone for 
OSX or Window depending upon what platform() this standalon is running on


  launch tApplication
  put the result into tError
  if tError is not empty then
    answer error tErrormEssage
  end if
  quit
end mouseUp

On Windows, the designated application launches promptly and my app 
quits immediately.


On OSX, the designated application launches promptly and my app waits 
way too long (a minute or two) before quitting.


Standalone built for OSX and Windows on Windows under LC905

Anyone have any experience like this? Any ideas on what to do to get the 
OSX version to quit when told to quit?


___
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: id3lib from Mark Smith -> id3_getPictureData

2019-10-12 Thread Matthias Rebbe via use-livecode
In case you need 1.02, just let me know.

Matthias Rebbe

free tools for Livecoders:
InstaMaker 
WinSignMaker Mac 

> Am 12.10.2019 um 22:05 schrieb Klaus major-k via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Hi Matthias,
> 
>> Am 12.10.2019 um 17:52 schrieb Matthias Rebbe via use-livecode 
>> mailto:use-livecode@lists.runrev.com>>:
>> 
>> Hi Klaus,
>> 
>> i´ve tried here with  library version 1.0.2 and an mp3 file which contains 
>> only 1 image.
>> I was able to read the picture data from the .mp3 and to store to a new file.
> 
> aha, I have version 1.0 here, will try with the newer one, thanks!
> 
>> Regards,
>> 
>> Matthias
>> 
>> Matthias Rebbe
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://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: id3lib from Mark Smith -> id3_getPictureData

2019-10-12 Thread Klaus major-k via use-livecode
Hi Matthias,

> Am 12.10.2019 um 17:52 schrieb Matthias Rebbe via use-livecode 
> :
> 
> Hi Klaus,
> 
> i´ve tried here with  library version 1.0.2 and an mp3 file which contains 
> only 1 image.
> I was able to read the picture data from the .mp3 and to store to a new file.

yeah, that works, thanks for the hint! :-)

> Regards,
> 
> Matthias

Best

Klaus

--
Klaus Major
https://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: id3lib from Mark Smith -> id3_getPictureData

2019-10-12 Thread Klaus major-k via use-livecode
Hi Matthias,

> Am 12.10.2019 um 17:52 schrieb Matthias Rebbe via use-livecode 
> :
> 
> Hi Klaus,
> 
> i´ve tried here with  library version 1.0.2 and an mp3 file which contains 
> only 1 image.
> I was able to read the picture data from the .mp3 and to store to a new file.

aha, I have version 1.0 here, will try with the newer one, thanks!

> Regards,
> 
> Matthias
> 
> Matthias Rebbe

Best

Klaus

--
Klaus Major
https://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: id3lib from Mark Smith -> id3_getPictureData

2019-10-12 Thread Matthias Rebbe via use-livecode
Hi Klaus,

i´ve tried here with  library version 1.0.2 and an mp3 file which contains only 
1 image.

I was able to read the picture data from the .mp3 and to store to a new file.

Regards,

Matthias

Matthias Rebbe

free tools for Livecoders:
InstaMaker 
WinSignMaker Mac 

> Am 12.10.2019 um 12:37 schrieb Klaus major-k via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Hi all,
> 
> I am currently looking at the "id3lib" of Mark Smith, works fine,
> however I cannot get the function "id3_getPictureData" to return
> usable data.
> 
> I am using the function correctly, passing the correct parameter
> dfor the image TYPE, but it returns nothing I can use in an image 
> object nor export to any valid image file.
> 
> I am using a MP3 file which definitively contains a JPG, so that 
> function should return usable data but doesn't.
> 
> This binary stuff is way over my head, so anyone can help?
> 
> Thanks a lot in advance.
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> https://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: Give a bug a hug

2019-10-12 Thread Lagi Pittas via use-livecode
It would help if Brian, Panos, Trevor (anybody who has got a setup ready to
compile)  created an idiots guide(s) as to what compilers to install, any
land mines to cross
any tricks that they have learnt etc because what seems to happen with me ,
I start something which doesn't put food on the table,
spend 3 or 4 hours fighting non existent documentation - leave it for
another day then probably have to start from  scratch again  when I've
forgotten what i'd learnt, or deleted
35G of Visual strudio that i'd installed .

Maybe a simpler (morons guide) version - an overview of the ide and
understand (and modify ) it as a starter.

Lagi



On Fri, 11 Oct 2019 at 18:02, Heather Laine via use-livecode <
use-livecode@lists.runrev.com> wrote:

> For what its worth, I think this is the way to go. A totally community run
> initiative, with a bounty on bug fixes. Someone or several someones outside
> of the LiveCode team would need to take responsibility for setting up a
> structure. We'd love to see bugs being fixed, by members of the community.
> It's kind of the reason behind Open Source. There are plenty of bugs that
> would be suitable, which don't require deep dives into the engine. Pull
> requests arrive in the usual manner and get approved or fed back on in the
> normal scheme of things by our team. If this could be encouraged by a
> bounty on fixes, funded by the community, run by the community and entirely
> outside of LiveCode Ltd.'s scope, what's not to like? Our overstretched
> resources would be augmented by a community team, and the dual nature of
> the licensing would bear fruit in a new and productive manner. I like it.
>
> Over to you.
>
> Best Regards,
>
> Heather
>
>
> Heather Laine
> Customer Services Manager
> LiveCode Ltd
> www.livecode.com
>
>
>
> > On 10 Oct 2019, at 22:17, Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > wow, i managed to mute this conversation.  fail.
> > @paul, that's exactly why we ponied up, too, as an insurance policy.  we
> > have been burned by numerous organizations either abandoning their
> software
> > work product or disappearing.  thankfully, for most of our
> mission-critical
> > stuff, we have, own, and maintain the source.
> > @Sean, I'm not generally thinking of the underlying engine for the bounty
> > program, I'm thinking of pieces in LCS/LCB.  In those cases, the PR
> doesn't
> > get submitted to the LC repo until whatever step it was further down.
> > There isn't any reason why private repos can't be used to manage this
> > process, especially with submodules.  The patrons would have access to
> the
> > repo, no one else would.
> > As for the conversation about the unfinished projects that all of us
> ponied
> > up for on a promise, I 100% agree, which is why the funds are escrowed.
> > The developer proposing a solution doesn't get paid until the patch is
> > tested and approved by the patrons of the patch.
> >
> > On Wed, Oct 9, 2019 at 11:02 AM Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> +1 Richard. I got onboard with what user to be Runtime Revolution (I
> think
> >> it was version 2!) Where livecode is today is orders of magnitude more
> than
> >> it was when it first started. There was no datagrid. No way to display
> >> tabular data apart from a very simple table field. No arrays. Difficult
> and
> >> confusing database APIs. No mobile support. The list goes on.
> >>
> >> LC is like a really good girlfriend. She isn't everything I ever wanted,
> >> but she's good enough for me. :-)
> >>
> >> Bob S
> >>
> >>
> >>> On Oct 8, 2019, at 19:49 , Richard Gaskin via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>>
> >>> Pi Digital wrote:
> >>>
> > On 8 Oct 2019, at 21:42, Richard Gaskin wrote:
> >
> > And here is a May 2016 update:
> >
> >
> >>
> https://livecode.com/trevor-devore-interviews-kevin-mark-on-infinite-livecode/
> >
> >
> > A small number of people keep going round and round on this a large
> > number of times.
> >
> > How many times will the same conversation happen before more recent
> > information is absorbed?
> 
>  An excellent article. Which part was you pointing to in reference to
>  Lagi’s question about older campaigns funded that have still not met
>  the core?
> >>>
> >>> There's a section in the middle listing off the accomplishments since
> >> the Kickstarter, and some of the discussion goes into how much of that
> was
> >> paid for out-of-pocket.
> >>>
> >>>
>  And which part do you refer to when asserting that absorption of info
>  is needed to reduce the same conversations recursion rate?
> >>>
> >>> The portion of Lagi's post I had originally quoted in my reply:
> >>>
> >>>   This is what I was talking about being treated like mushrooms
> >>>   - no communication as to what the future holds.- rough timescales
> >>>   as to when new or reassigned resources will be 

id3lib from Mark Smith -> id3_getPictureData

2019-10-12 Thread Klaus major-k via use-livecode
Hi all,

I am currently looking at the "id3lib" of Mark Smith, works fine,
however I cannot get the function "id3_getPictureData" to return
usable data.

I am using the function correctly, passing the correct parameter
dfor the image TYPE, but it returns nothing I can use in an image 
object nor export to any valid image file.

I am using a MP3 file which definitively contains a JPG, so that 
function should return usable data but doesn't.

This binary stuff is way over my head, so anyone can help?

Thanks a lot in advance.


Best

Klaus
--
Klaus Major
https://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: Is it possible to implement Weizenbaum's original Eliza as a chatbot with LIVECODE?

2019-10-12 Thread Jjs via use-livecode
Nice! I thought first what the h Is it. But then i saw the screenshot, and 
it flashed thru my mind. I remember having it on the MSX too. Asking questions 
and getting answers. It's the same right? Actually the first AI heh

hh via use-livecode  schreef op 12 oktober 2019 
00:38:43 CEST:
>> I wrote:
>> You could build on https://www.masswerk.at/elizabot/
>> ...
>> You could similarly make a LC GUI based on elizabot.js in
>> a browser widget.
>> ...
>
>Here is a basic LiveCode GUI:
>Browser Widget usage example #28: ELIZA_bot
>http://forums.livecode.com/viewtopic.php?p=184198#p184198
>
>The jslib and the vocabulary are included in the stack.
>Moreover that default vocabulary is attached for editing
>(you can the chnaged file import to the stack, replacing
>the default vocabulary, using button "ImportData").
>
>___
>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

-- 
Verstuurd vanaf mijn Android apparaat met K-9 Mail.
___
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