Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Patrik Karlström
Thank you Emilian, Marco and Geertjan. I'll read up on what you mentioned and try things out. Working on an alternative, pure JavaFX WindowSystem[1], I was looking for a way to handle dynamically created "editor documents", but after a short break I realized it can be done without lookup, the "edi

Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Emilian Bold
The Lookup is just a 'HashSet' where a single instance for your service is added at startup (more or less). That's the only relationship between the two. Creating further objects does not add them to the Lookup, they are just normal Java objects created with a constructor. I wonder if you could u

Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Geertjan Wielenga
Or get hold of leanpub.com/nbp4beginners It hasn’t been updated for some time, but I’ve not yet seen anything in it that needs updating. Gj On Sun, 13 Oct 2019 at 19:17, Marco Rossi wrote: > Hello Patrick, > > you should create your own Lookup where to put what you want. I called > this “Mutab

Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Marco Rossi
Hello Patrick, you should create your own Lookup where to put what you want. I called this “MutableLookup” (I’ve found it on the web). You can use the put method to add the instances or your objects to lookup. You could keep an instance of MutableLookup inside a TopComponent and call TopCompon

[lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Patrik Karlström
I feel somewhat stupid asking this one, but I just can't grip how to "publish" a "dynamically created" object so it will show up in lookupAll(). This is a really small library I'm working on and the only NetBeans dependency I have is org-openide-util-lookup, if that matters at all. The following