[Gambas-user] can stored a OPENED connection object in a colletion?
PICCORO McKAY Lenz
mckaygerhard at gmail.com
Fri Jun 29 14:32:51 CEST 2018
2018-06-28 18:05 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
> If I understand you correctly, then there is bug in your code and the
> problem is not due using collection.
>
umm now thinking when i manage the configuration file got that:
gb.settings: warning: unable to save settings:
/home/remoto/Devel/libcomun/libmngr/exdatabase.conf: Settings
.Save.204 Unable to save settings: Settings.WriteValue.563 Type mismatch:
wanted Object, got Pointer instead
> If however you have scope problem you need object serialization. I don't
> think PHP does that automatically either.
>
yeah, the object must be serializated to proper identification and manage
but in my case this are made automatically by the framework (a little
modified by me for that)
but.. in any case can be done.. more easy as i can see rather than gambas..
so ill revise your suggestions comments and post feedback here
>
>
> Jussi
>
> On Fri, Jun 29, 2018 at 12:31 AM, PICCORO McKAY Lenz <
> mckaygerhard at gmail.com> wrote:
>
>> 2018-06-28 10:43 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>
>>> I can't understand your English.
>>> Collection does not store object, it stores object reference. Thus if
>>> you are out of scope of the object, the collection contains useless
>>> reference.
>>> So, with correct scope, there shouldn't be any problems.
>>>
>> well it's hard to explain, but in php i can "store" or "transport" and
>> object using arrays..
>>
>>
>>
>>> Maybe you should show your code, that we could understand what you are
>>> trying to achieve.
>>>
>> well i must chage a little to release portion of code from the job..
>>
>>
>>
>>>
>>>
>>> Jussi
>>>
>>> On Thu, Jun 28, 2018 at 4:04 PM, PICCORO McKAY Lenz <
>>> mckaygerhard at gmail.com> wrote:
>>>
>>>> 2018-06-27 16:50 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>>>
>>>>> Your English makes no sense.
>>>>>
>>>> sorry last line was misctyped!
>>>>
>>>>
>>>>
>>>>> If you destroy object, you do nothing with the reference. So, they
>>>>> must have same scope.
>>>>>
>>>> i not taking about destroyng object but if the created object are on
>>>> the part that stored in the collection this makes sense..
>>>>
>>>> so then how can avoid that behaviour?
>>>>
>>>> i want something like php does with arrays ... ver very flexible!
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> Jussi
>>>>>
>>>>> On Wed, Jun 27, 2018 at 4:11 PM, PICCORO McKAY Lenz <
>>>>> mckaygerhard at gmail.com> wrote:
>>>>>
>>>>>> so if i made a collection of my 3 of 4 connections objects those can
>>>>>> be opened globally!
>>>>>>
>>>>>> how can i emulated a stored object connection that must be opened
>>>>>> always before running the query?
>>>>>>
>>>>>> of course without inherits, due if all my objects inherits from one
>>>>>> that already have opened i can use it!
>>>>>>
>>>>>> Lenz McKAY Gerardo (PICCORO)
>>>>>> http://qgqlochekone.blogspot.com
>>>>>>
>>>>>> 2018-06-26 18:49 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:
>>>>>>
>>>>>>> Collections have only reference to objects, they do not contain
>>>>>>> objects.
>>>>>>>
>>>>>>>
>>>>>>> Jussi
>>>>>>>
>>>>>>> On Wed, Jun 27, 2018 at 12:18 AM, PICCORO McKAY Lenz <
>>>>>>> mckaygerhard at gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> i can setup and store the connection object once opened in a
>>>>>>>> collection of connection objects?
>>>>>>>>
>>>>>>>> i want to use a pool from configuration file!
>>>>>>>>
>>>>>>>> so can stored a OPENED connection object in a colletion? (urrently
>>>>>>>> seems when i used me.add the conectuion object happened closed)
>>>>>>>>
>>>>>>>> Lenz McKAY Gerardo (PICCORO)
>>>>>>>> http://qgqlochekone.blogspot.com
>>>>>>>>
>>>>>>>>
>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>>>> ]----
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>>> ]----
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>>> ]----
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>>> ]----
>>>>>
>>>>>
>>>>
>>>>
>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>> ]----
>>>>
>>>>
>>>
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>>
>>>
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180629/a925eff3/attachment.html>
More information about the User
mailing list