Jettisoning LCB?

All flavors welcome.
Forum rules
Be kind.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

richmond62 wrote: Tue Jul 16, 2024 10:08 am Once OXT Lite 'crystalises' its interface there needs to be comprehensive documentatio[n] about all its features, options, and what have you.
It's continuously evolving, changing - and I'm adding bits to it as requested (as well as trying to fix all the bits we discover as we go along). I'm not sure it'll ever 'crystalise'. (If you mean, will it get to a point where it always looks the same: probably - when nobody is working on it anymore).

Even MacOS hasn't fully 'crystalised' - compare what it looks like now to any point in the past - it's constantly changing and evolving. The only way it stays the same is when developers drop support for a particular version or platform.

Who knows: when we are all on Arm machines and can no longer back-port to intel-x64 any more, then it'll crystalise. :D
(or maybe sooner for the Mac, if/when Apple completely can the ability to run intel apps on the latest OS).
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Jettisoning LCB?

Post by richmond62 »

Even MacOS hasn't fully 'crystalised'
No, it hasn't.

But, if I want to find out how to do something, or twiddle with some settings, all I have to do is perform a web-search and I get almost too much help.
when we are all on Arm machines
As they cost both a Leg and an Arm, that won't happen very soon in my case.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

richmond62 wrote: Tue Jul 16, 2024 1:23 pm ...all I have to do is perform a web-search and I get almost too much help.
Yes, but then MacOS and the Mac user-base is a lot larger than the OXT user base or the LC one.
There's bound to be more help out there and more articles, youtube videos etc. As we have, well... not a lot.

So rather than potentially worrying about what we should jettison, perhaps it's better to think about what we can add - and what information can be put out there in the way of documentation, videos and raising awareness.

Or perhaps this will just show that there's no takers for any of it, and the only people adding to it are the 'crazy ones'.
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Jettisoning LCB?

Post by richmond62 »

So rather than potentially worrying about what we should jettison, perhaps it's better to think about what we can add - and what information can be put out there in the way of documentation, videos and raising awareness.
Indeed.

-
Screenshot 2024-07-16 at 16.38.42.png
Screenshot 2024-07-16 at 16.38.42.png (281.71 KiB) Viewed 2706 times
-
The 'thing' that worries me about having LCB "on the surface" is that it might be potentially a bit misleading: particularly if the documentation (such as there is) continues to make the sort of blue sky claims its inventors have made for it.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Jettisoning LCB?

Post by richmond62 »

Can you confirm if you've got the checkbox turned on in the preferences for the Quick Dictionary?
-
Screenshot 2024-07-16 at 16.43.00.png
Screenshot 2024-07-16 at 16.43.00.png (135.15 KiB) Viewed 2705 times
-
I have now:
-
Screenshot 2024-07-16 at 16.44.06.png
Screenshot 2024-07-16 at 16.44.06.png (118.83 KiB) Viewed 2705 times
-
And it seems no better as it does NOT present the user with a scrollable list of terms.

The problem (quite apart from the problem with those dictionaries) is how will the "newbies" know where to look, and what to set as options/settings and so forth when they crack open the IDE for the first time?
-
vs.jpeg
vs.jpeg (6.63 KiB) Viewed 2705 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

Well yes, the dictionary needs to know the question before it can provide an answer.
It is a dictionary.

Not a user guide.
That's why we need user guides and documentation.

TerryL has included some already, which you'll find in the "Help" menu > "Lessons".
The more the merrier as far as I'm concerned.
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Jettisoning LCB?

Post by richmond62 »

the dictionary needs to know the question before it can provide an answer
Quite.

But the user can be given a leg-up re the question if they have access to a scrollable list of all the terms available: even to the extent that they will not need to ask the question at all.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

It would be great to get the auto-complete working in script editors, as I think this would help.
Additional examples, stacks with examples you can drag to your stack, user guides, PDFs, videos... all things that would be great for newcomers and would be excellent to focus our efforts on (in my opinion).
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Jettisoning LCB?

Post by OpenXTalkPaul »

richmond62 wrote: Mon Jul 15, 2024 5:55 am As LCB can, at best, be described as a half-finished, largely undocumented thing I wonder how valuable keeping it is . . .

1. Maybe it should be 'completed' (what ever that really means).

2. Maybe a "Watch Out!" notice should be attached to it so that xTalk programmers do not lose an awful lot of time fossicking around down a dark rabbit hole.

3. Maybe it should be 'buried' to such an extent that although it is still 'there' it is inaccessible to end-users.

Certainly if OXT is to retain LCB it needs to be documented in such a way that end-users can learn how to use it just as quickly as one can learn xTalk.
I wouldn't say it's only half finished, rather that it could be expanded on significantly.
There's also the externals interface which is much more old way of adding capabilities, and far less user freindly as you need to code them in C++ and compile them with Xcode, Visual Studio, etc.

Builder documentation could be significantly better, and much more beginner friendly. There is a guide in 'guides' tab of the Dictionary that has a very basic walkthrough of building simple 'Pink Circle' widget.

I do have a folder of stacks collected that are attempts by various community members (and some quick tools I made for myself) that can make extension builder easier. I was recently going through this folder and realized that Hermann Hoch made a very useful stack for setting up widget properties and assigning different Property Inspector editors to those properties, which is something that can be a little bit tedious if you have a lot of properties to assign editors for. I'll try to remember to upload it here later tonight.

I do like the idea of making a sort of extension building mini-IDE, that can produce at least basic widgets with some click-to-add functionality. I think that sort of instant sample code is needed because widgets aren't like other objects in that they don't have any functionality at all, not even any real visual representation, unless you add code to draw something.

The foreign function interface has a few things that are a bit tricky to use as well. Like declaring a 'struct', which would be a 'foreign type declaration', is tricky in a way that's similar to binaryEncode/binaryDecode using a string of characters where each char represents a byte-chunk type (ie. unsigned integer, float, natural float, etc.)

There is tutorials around and open-source sample code to learn from. All of the included widgets in the IDE come with their source code. You might want to start with a very basic example like 'Pink Circle' widget. I'm happy to answer any questions that I'm able to if anyone gets stuck on something in particular.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

richmond62 wrote: Mon Jul 15, 2024 12:49 pm XTB . . . erm.
"X Total Bull . . ."
I think that xTalkB is a better bet.
The only issue I have with xTalkB is that consider a language selection option on the dictionary.
I have "xTalk Script" and "xTalkB" - might be a bit confusing for a newcomer.

Since you seem to be my sole beta-tester Richmond, would you be happy with "xTalk-Builder" instead?
User avatar
richmond62
Posts: 4832
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Jettisoning LCB?

Post by richmond62 »

Since you seem to be my sole beta-tester Richmond
Pretty sad really.

"xTalk-Builder" seems very sensible. 8-)
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Jettisoning LCB?

Post by OpenXTalkPaul »

I've been calling it xTension Builder because that's what it was designed for, extending the xTalk environment.

No, it's not easier to just switch to C++ or ObjectiveC IMO. I've translated xTalk scripts into XB and there were lines that actually stayed the same. It is after all based on xTalk.

To make use of any of those OS or other APIs you will have to learn some lower level concepts, there's just no avoiding it. At minimal certain variables need to be typed (Builder can do some type inference). But that's 100% true of doing anything like that with ANY other scripting language too. In fact LCB is using LibFFI just like you would with Python or Javascript or Lau ObjC to access Objective C or JAVA or whatever based APIs. You also need to learn about whatever API you are trying to use, if it's object oriented API you need to understand some OOP concepts. That's all true REGARDLESS of what language you are using. There's very few APIs that have 'very high-level' sort of syntax you might think of as being xTalk-like, but that's why we want to be able to wrap them in higher-level syntax, and that's what XB FFI was design for. If xTalk is ever going to have the sort vast ecosystem of Python, NodeJS, etc. it needs to have some sort of FFI system, and some 25yr old C glue code for Externals just isn't good enough for me, it's certainly not xTalk-like enough for me. Xtension builder on the other hand is more like 'CompileIt!" versus the Externals API which is similar (based on) XCMD/XFCN glue from HyperCard.

ALSO, I want to point out that the LCB docs are wrong when it says there's only two kinds, Widgets or Libraries. There's a third kind that is a language module, which is where the language syntax is defined, so if you think it's lacking we can add to the language itself.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Jettisoning LCB?

Post by OpenXTalkPaul »

The guide you want to start with should be in the Guides section from within the IDE., begins with 'Extending', or see source here:

https://github.com/OpenXTalk-org/OpenXT ... g%20OXT.md

And here's the most basic 'Pink Circle' example from that here with my comments added:

Code: Select all

widget community.livecode.beaumont.pinkCircle -- module type & identifier declaration

metadata title is "My Pink Circle" -- will be default name for new objects of this widget type
metadata author is "Benjamin Beaumont"
metadata version is "1.0.0" -- with some filenames the a version number will get tacked on to the end of the identifier

use com.livecode.canvas -- this imports the 'canvas' library/language module which is included with Builder

public handler OnPaint() -- public means make handler accessible from the scripting engine
	-- OnPaint is called automatically by the scripting engine whenever it needs the widget to re-render itself

   variable tCirclePath as Path --- variable type decoration, tCirclePath will hold data of type Path
   --  some variables can work fine without declaring a type, if the line were 'variable tCirclePath' the variable could still hold an SVG path string. Sometimes it can be a custom type you invent to help remember what sort of data that a variable is meant to contain.
   
    -- code / syntax, like the 'point' variable type definition, is defined in language modules such as com.livecode.canvas from the above 'use' statement.
    -- we create a circle path that will be centered in the widget, with a radius that's half the width of the widget
    -- and we store that unpainted path string in our variable that's of type 'Path'
   put circle path centered at point [my width / 2, my height / 2] with radius (my width/2) into tCirclePath
   
   -- Set the color to paint with. 'Color' in Builder is an array of three or four (alpha channel floating point numbers
   -- A helper lib can be used that has handlers for converting between 0 to 255 triplet strings into 0.00 to 1.00 array color.
  
   set the paint of this canvas to solid paint with color [1, 0, 1]

   // Actually paint the path, which will be filled with our color, canvas drawing syntax is fairly self explanatory
   fill tCirclePath on this canvas 
end handler

end widget
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Jettisoning LCB?

Post by Skids »

Bump!

My two cents on this subject is that builder has its uses and I would like it to stay. I have played with the Foreign Function Interface and added calls that allow the reading of the user's calendar data. The biggest issue I found was overcoming the OS's privacy features which seem to change with every new OS.

So far I have not tried building a widget and am interested in the different opinions which if I have understood correctly seem to boil down to custom controls written with standard script are faster but widgets have better graphic capabilities. Is this correct?

I have written the odd custom control and have a tools stack which stores custom controls along with their documentation if anyone is interested.

I have just seen the demo of Livecode Create and note that all its controls were described as widgets but I have no idea if they are the same as what I guess are now Classic Widgets.
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Jettisoning LCB?

Post by OpenXTalkPaul »

Skids wrote: Tue Aug 13, 2024 9:36 pm So far I have not tried building a widget and am interested in the different opinions which if I have understood correctly seem to boil down to custom controls written with standard script are faster but widgets have better graphic capabilities. Is this correct?
custom controls written with standard script are easier, but I don't think they're faster to render, I would say that widget canvas drawing is faster, but it is more work to build anything with it.
I have written the odd custom control and have a tools stack which stores custom controls along with their documentation if anyone is interested.
Yes please, I'm working on Tools palette redesign currently so that may be something I can incorporate into it.
I have just seen the demo of Livecode Create and note that all its controls were described as widgets but I have no idea if they are the same as what I guess are now Classic Widgets.
I have seen the live demo of a bunch of the widgets on a web-page (I guess with LC Create's wasm web engine), some of those already existed in LC Community, most of the rest seem to be widgets they formerly bundled with the LC commercial products or were sold separately, and a few new ones.
They're not anything that we couldn't also do, our own way of course.

I'd love for someone else to also be working on widgets and extension stuff. I'm more than happy to help teach it if need be.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Jettisoning LCB?

Post by Skids »

Hi Paul,

I have attached my tools palette below. Its a pia to edit as the main stack and sub stacks have their style set to palette so frequent use of the project browser is required when editing code. The red behavior buttons are used by the palette and the others are those used by the custom controls.

best wishes
Simon
UserToolsv2-1-2.oxtstack
(224.28 KiB) Downloaded 58 times
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

OpenXTalkPaul wrote: Wed Aug 14, 2024 3:00 am I'd love for someone else to also be working on widgets and extension stuff. I'm more than happy to help teach it if need be.
I'd love to add some more 'widgets' - are we still calling them 'widgets'? I ask because in the object browser, there's a mention of a couple of 'widgets' (circled on this screenshot), which are actually standard objects. (They aren't widgets as I understand them - they are actually classic controls with a preset load of custom properties defined).
widget-lib.png
widget-lib.png (267.96 KiB) Viewed 2061 times
Or is 'widget' just a catch-all term for something that doesn't fit somewhere else?

Anyway, I'd like there to be a new + button, as I'd removed the older one on the tools palette (and had mentioned I'd bring it back later) - I'd like a "Widget library" like the 'Object Library' to appear in this menu, and to work the same way as the 'Object Library' - so they can simply be placed into a stack.
I'm also keen for this potentially new 'Widget Library' to be as self-contained as possible, meaning these can simply be dragged out of here into a user's topstack - no additional files to add/remove in the IDE - or are there lots of multiple supporting files that have to live in specfic locations within the IDE?
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Jettisoning LCB?

Post by tperry2x »

Skids wrote: Wed Aug 14, 2024 6:08 am I have attached my tools palette below.
Hi Simon, thanks for this - It ties in nicely with my point above - could we add all this to a future 'widget library'?
user-tools.png
user-tools.png (142.06 KiB) Viewed 2058 times
A couple of points I've picked up on, and potentially small changes:
I changed the "tmGaugeValue" but didn't see any visible change to the circular progress widget.
Also, could the "itemsFromList" and the "listPickerWithAddition' grouped 'widgets' be resizeable, so they adjust relative size / positioning as they are adjusted? - could just be a resizeControl message in the group:

Code: Select all

on resizeControl
  -- do some scaling / positioning  with the multiple objects in this group
  pass resizeControl
end resizeControl
But yes, all this kind of thing in a 'Widgets Library' window?
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Jettisoning LCB?

Post by Skids »

Hi Simon, thanks for this - It ties in nicely with my point above - could we add all this to a future 'widget library'?
Yes feel free. Does this mean that any extra/addition with a graphical element is known as a widget?
A couple of points I've picked up on, and potentially small changes:
I changed the "tmGaugeValue" but didn't see any visible change to the circular progress widget.
This is a custom control based on code I borrowed /stole from Tactile Media so I need to check that Mr. Rossi is willing for it to be included in future builds.

If you Ctrl Click on the icon in the palette the instructions for the control will open. Did you initialise the guage before trying to update it? I'll have a look to check its still working.
Also, could the "itemsFromList" and the "listPickerWithAddition' grouped 'widgets' be resizeable, so they adjust relative size / positioning as they are adjusted? - could just be a resizeControl message in the group:
I should think so, I'll add it to my todo list.
Mostly using a Mac Studio M2 running MacOS Sonoma.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Jettisoning LCB?

Post by Skids »

The progress widget is working. Please see the attached demo stack.
GuageTest.oxtstack
(12.71 KiB) Downloaded 57 times
Mostly using a Mac Studio M2 running MacOS Sonoma.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests