EditorFactory - Module for object management in a Canvas

Share your advanced PureBasic knowledge/code with the community.
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

netmaestro wrote: Mon Dec 05, 2022 3:46 am I confess to being confused as to which of stargate and shadowstorm is the one who wants to get paid. I don't want to express an opinion and then turn out to be wrong as to which it is.
I said screw the money, this module is not about making money, I have to say it with what words!

What bothers me is the idea of giving a code, not a software, a code, like open source, and that people integrate it into their software and get paid, for a module (code) that was created by other people, and it should be free lol!

Anyway as Stargate said, no matter what I face, I would be "losing", even if I put it "open source", which I don't want, I would have no recognition, and anyway even if I did, I don't like the idea!

The idea that I don't like here is to integrate a code in a program, a free code moreover, then to make the software paying at the end!

So free is good, but no commercial license, that's all!
Otherwise you give back like 50% of the profit to share between Stargate and me!

It's already good that it's free, and I don't have to do it, I could charge for the code!
But in this case, if it is paying, here the commercial license would be OK!

When I say "I", it's because Stargate and I have a different vision, a vision that I find remarkable on his side, but that I find hard, considering my past etc....

Anyway, I can't stand the idea of selling something that doesn't belong to me, even partially, I find it disgusting to do that.

Besides, if it's free, it's also because I'm not the only one here, it's Stargate who coded all this, so I don't have a problem with the free part as long as the person doesn't make money on our backs, so I'm not that bad either!
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

the.weavster wrote: Mon Dec 05, 2022 9:18 am
netmaestro wrote: Mon Dec 05, 2022 7:49 am Imho the idea itself has little to no value as many have come up with it before.
I agree.
It's an idea already implemented in other languages too, so certainly not a "Eureka!" moment.

EaselJS
PixiJS
Tkinter
Yes but nothing in PureBasic ;)
Well, now there is a but...

And what are the licenses of these programs ?
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: EditorFactory - Module for object management in a Canvas

Post by the.weavster »

ShadowStorm wrote: Mon Dec 05, 2022 9:53 am Yes but nothing in PureBasic ;)
Well, now there is a but...
Nope, there really is no but... 🙄
ShadowStorm wrote: Mon Dec 05, 2022 9:53 am And what are the licenses of these programs ?
MIT
MIT
PSF
punak
User
User
Posts: 63
Joined: Tue Sep 07, 2021 12:08 pm

Re: EditorFactory - Module for object management in a Canvas

Post by punak »

Hello, this is a valuable module. If splittergadget can be designed in this module, I think there is no significant shortage.
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

the.weavster wrote: Mon Dec 05, 2022 10:27 am
ShadowStorm wrote: Mon Dec 05, 2022 9:53 am Yes but nothing in PureBasic ;)
Well, now there is a but...
Nope, there really is no but... 🙄
Of course, if there is a "but"
> Free but not sellable or usable in software for sale.
ShadowStorm wrote: Mon Dec 05, 2022 9:53 am And what are the licenses of these programs ?
the.weavster wrote: Mon Dec 05, 2022 10:27 am MIT
MIT
PSF
Ok, so all these licenses are 100% free.
That makes you think!

Well, ok it exists so, all free, personally it shocks me that someone can sell another person's work.
I have a real problem with that, it offends me!
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

the.weavster wrote: Mon Dec 05, 2022 10:27 am
ShadowStorm wrote: Mon Dec 05, 2022 9:53 am Yes but nothing in PureBasic ;)
Well, now there is a but...
Nope, there really is no but... 🙄
Of course, if there is a "but"
> Free but not sellable or usable in software for sale.
ShadowStorm wrote: Mon Dec 05, 2022 9:53 am And what are the licenses of these programs ?
the.weavster wrote: Mon Dec 05, 2022 10:27 am MIT
MIT
PSF
Ok, so all these licenses are 100% free.
That makes you think!

Well, ok it exists so, all free, personally it shocks me that someone can sell another person's work.
I have a real problem with that, it offends me!
punak wrote: Mon Dec 05, 2022 11:19 am Hello, this is a valuable module. If splittergadget can be designed in this module, I think there is no significant shortage.
Hello, sorry, I did not understand everything, please be more clear in your request :)
Thank you.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
punak
User
User
Posts: 63
Joined: Tue Sep 07, 2021 12:08 pm

Re: EditorFactory - Module for object management in a Canvas

Post by punak »

@ShadowStorm : In the examples in the module package, (at design time), I didn't see the splitter.
maybe you will understand what I mean better with a picture :
Image

this request is not only for form controls , It can be used in other designs as well..
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: EditorFactory - Module for object management in a Canvas

Post by the.weavster »

ShadowStorm wrote: Mon Dec 05, 2022 12:03 pm personally it shocks me that someone can sell another person's work.
I have a real problem with that, it offends me!
Is it more shocking and offensive than you wanting to receive recognition for STARGÅTE's work when all you really did was submit a feature request?
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

the.weavster wrote: Mon Dec 05, 2022 1:42 pm
ShadowStorm wrote: Mon Dec 05, 2022 12:03 pm personally it shocks me that someone can sell another person's work.
I have a real problem with that, it offends me!
Is it more shocking and offensive than you wanting to receive recognition for STARGÅTE's work when all you really did was submit a feature request?
But don't think that I didn't do anything!
It is me who thought the module, the functions, I said to Stargate, I would like this and that to face this, that.....

I translated everything into French, I made examples, help in part, he says so himself!

I didn't "do nothing", and if we had to be paid, I would give the biggest share to Stargate, obviously!

What should I be ashamed of, go ahead and tell me?
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by Fred »

Ok, let's close this discussion right now, it's going nowhere and continue using private messages. Only replies actually talking about this module coding will be accepted on this thread.
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

punak wrote: Mon Dec 05, 2022 1:35 pm @ShadowStorm : In the examples in the module package, (at design time), I didn't see the splitter.
maybe you will understand what I mean better with a picture :
Image

this request is not only for form controls , It can be used in other designs as well..
Yes but no, this module is not designed to add "gadgets", it is designed to add objects to a canvas and to parameterize them, you understand?

We can't redo all the gadgets ^^

Of course, there are containers but that's important to be able to encapsulate objects and attach objects to other objects, that makes me think that some functionality is missing here!

but you can put a canvas on each side and add objects to it and it will work!
If you wish I can make an example for you.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: EditorFactory - Module for object management in a Canvas

Post by STARGÅTE »

punak wrote: Mon Dec 05, 2022 1:35 pm @ShadowStorm : In the examples in the module package, (at design time), I didn't see the splitter.
maybe you will understand what I mean better with a picture :

this request is not only for form controls , It can be used in other designs as well..
Dear punak,
In fact, you are right. Actually, there is no function for creating such behavior. The attachment system is for stacking objects into others.
Here, the splitter create a connection between two objects on same level, like a joint.
Indeed, i started last year do add a function: ConnectObjects() to connect object regarding their position or size or something else.
Such function would add your requested feature, even if is not called "splitter"
Fred wrote: Mon Dec 05, 2022 2:24 pm Ok, let's close this discussion right now, it's going nowhere and continue using private messages. Only replies actually talking about this module coding will be accepted on this thread.
Thanks. +1
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: EditorFactory - Module for object management in a Canvas

Post by ShadowStorm »

Yes I think we could dig here, I once tried to make a real window with several objects, a window object, button objects, but I was not successful, I wanted the buttons to be glued to the window like a real one, and when I resize it, the buttons get stuck on the window, ok good and good to see next.
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Re: EditorFactory - Module for object management in a Canvas

Post by superadnim »

well i tried but this doesnt seem to save everything

Code: Select all

;{ Saves all objects to a file
	;  Result:                The output filesize if created.
	;} 
  Procedure.i SaveObjects(iCanvasGadget.i, FileName.s)
  	
  	Protected *ObjectManager.ObjectManager : _ObjectManagerID_(*ObjectManager, iCanvasGadget, 0)
  	
  	If ListSize(*ObjectManager\lpObject())
  		
  		Define.i hJson = CreateJSON(#PB_Any)
  		If IsJSON(hJson)
  			InsertJSONStructure(JSONValue(hJson), *ObjectManager\lpObject(), Object)
  			
  			Define.s output = ComposeJSON(hJson, #PB_JSON_PrettyPrint)
  			If output
  				Define.i hFile = CreateFile(#PB_Any, FileName)
  				
  				If IsFile(hFile)
  					WriteString(hFile, output )
  					CloseFile(hFile)
  				EndIf
  				
  			EndIf
  			
  			FreeJSON(hJson)
  		EndIf
  		
  		ProcedureReturn FileSize(FileName)
  	EndIf	
  	
  EndProcedure
any ideas?

edit: typo. also i hope this becomes further developed i didnt fully understand the previous discussion but it didnt make sense to continue it i think the involved parties should hash it out privately and let the rest enjoy coding and sharing. if someone could help me get the save / load working i would appreciate it im not giving up anyway but i need to further read the code to understand how it works i think im missing something.

:lol: should I bash the keyboard and give up?
:?
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Re: EditorFactory - Module for object management in a Canvas

Post by superadnim »

so i tried to use EditorFactory with InsertJSONStructure but i constantly get MAVs

also if memory addresses are kept when i save and load again it would corrupt the program does this mean i have to manually iterate and save each element properties instead?

thanks

:lol: should I bash the keyboard and give up?
:?
Post Reply