>> The ideal thing would be to find some java mechanism that allows him to
>>`append` this checksynchronize to `the` main loop, some main-loop hook
>> of sorts.
Hum, if somebody have some idea how to implement it, he is very welcome to
show his way... ;-)
PS: By the other way, here some conclusio
@ Ewald and Sven => many thanks ;-)
> The ideal thing would be to find some java mechanism that allows him to
>`append` this checksynchronize to `the` main loop, some main-loop hook of
sorts.
Yep, i will be hyper-interested by that feature...
So, until that day will come, i will use a Java-timer
On 05/31/2014 12:38 PM, Sven Barth wrote:
> On 31.05.2014 12:10, fredvs wrote:
The question here is: where did you type it?
>> Inside the loop in thread, after each queue()... and also just before
>> end of
>> thread.
>
> *That* does not help. Queue put's the method pointer you provide into
>
On 31.05.2014 12:10, fredvs wrote:
The question here is: where did you type it?
Inside the loop in thread, after each queue()... and also just before end of
thread.
*That* does not help. Queue put's the method pointer you provide into a
queue that needs to be read by the *main thread*. It *wi
>> The question here is: where did you type it?
Inside the loop in thread, after each queue()... and also just before end of
thread.
>> the next thing to go for, is probably be to try to get this
>>`CheckSynchronize;` integrated into java in a decent manner
>> (applicable to most use cases, that
Am 30.05.2014 13:09 schrieb "fredvs" :
> Hum, so maybe, (im new in Java) use a Java-timer who calls
> uos.checksynchro(); at regular time...
If the timer event runs in the same thread as your current call to
checksynchro resides then it will work. If it's executed by a different
thread then not.
On 05/30/2014 01:15 PM, fredvs wrote:
> Please read my earlier post before this one
>
> @ Ewald, i have try with :
>
> While true do
> Begin
> ... code ...
>
> CheckSynchronize;
> End;
>
> But this does not work...
>
The question here is: where
Please read my earlier post before this one
@ Ewald, i have try with :
While true do
Begin
... code ...
CheckSynchronize;
End;
But this does not work...
Thanks
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-ge
Yep, yep, yep some very good news...
1) Added a new procedure in fpc library:
=>
procedure uos_checksynchro(PEnv: PJNIEnv; Obj: JObject) ; cdecl;
begin
checksynchronize();
end;
2) And, of course, in fpc library exported as:
=>
exports
...
uos_checksynchro name 'Java_uos_checksynchro',
...
3
On 30 May 2014, at 10:46, fredvs wrote:
> re-@ Ewald :
>
>>> It *must* be called in the context of the main thread (the thread that
>>> loaded the library)
>
> OOps, so do you mean that CheckSynchronize must be called by Java ?
> So i have to add a "custom" procedure in the fpc library (who wil
On Fri, 30 May 2014, fredvs wrote:
re-@ Ewald :
It *must* be called in the context of the main thread (the thread that
loaded the library)
OOps, so do you mean that CheckSynchronize must be called by Java ?
So i have to add a "custom" procedure in the fpc library (who will be only a
fpc Ch
re-@ Ewald :
>> It *must* be called in the context of the main thread (the thread that
>> loaded the library)
OOps, so do you mean that CheckSynchronize must be called by Java ?
So i have to add a "custom" procedure in the fpc library (who will be only a
fpc CheckSynchronize()) ?
Is it that that
On Fri, 30 May 2014, fredvs wrote:
@ Ewald => thanks.
Hum, i did use checksynchronize but it did not help...
When do you call it.
Must it be used with fptimer.ontimer too ?
No.
And why fptimer.ontimer is not executed ?
If CheckSynchronize is not executed at regular intervals,
fptime
@ Ewald => thanks.
Hum, i did use checksynchronize but it did not help...
Must it be used with fptimer.ontimer too ?
And why fptimer.ontimer is not executed ?
Will i have more luck with other timer like epiktimer from Graeme (or the
new one from Michael) ?
Thanks.
PS : I will try with some more ch
On 05/29/2014 11:18 AM, fredvs wrote:
> but the timer does not execute
> CallvoidMethod at fptimer.ontimer...
Just a guess here...
To quote Sven a few mails ago: `CheckSynchronize is used to process
calls to TThread.Synchronize and TThread.Queue. It *must* be called in
the context of the main thr
Hello Sven, hello Michael => many tanks.
I have follow your advices... but...
I have then create a object and a procedure inside that object.
I use then queue() or synchronize() inside the thread to execute that
procedure of object.
That procedure call CallvoidMethod.
OK, everything compiles but
On 05/26/2014 09:47 PM, fredvs wrote:
Hum, checksynchronize(), i do not realy understand how to use in the
thread/loop...
I am working on an "ActiveNoUIi" widget type to be usable with Lazarus.
Here you can use "normal" Lazarus compatible TTimers.
This already works nicely for me (Linux X86
On 26.05.2014 21:47, fredvs wrote:
Yep, Michael, thanks...
Ok then for Nil owner...
Hum, checksynchronize(), i do not realy understand how to use in the
thread/loop...
In the loop i do not use synchronize, because the procedure that is called
is a java/method and synchronize is for procedure of
Yep, Michael, thanks...
Ok then for Nil owner...
Hum, checksynchronize(), i do not realy understand how to use in the
thread/loop...
In the loop i do not use synchronize, because the procedure that is called
is a java/method and synchronize is for procedure of object outside the
thread... (Or i mi
On Mon, 26 May 2014, fredvs wrote:
Hello.
What is the best way to unthread a procedure ?
I have try with a fptimer outside the thread but the thing that disturb me
is that you need a tcomponent as owner to create it.
And in the library i do not use any tcomponent...
How to create a fptimer wi
Hello.
What is the best way to unthread a procedure ?
I have try with a fptimer outside the thread but the thing that disturb me
is that you need a tcomponent as owner to create it.
And in the library i do not use any tcomponent...
How to create a fptimer without owner ?
I have try with fptimer.cr
>> Posting some code might help.
I may post code but not sure it will help.
The code is the same as
http://wiki.freepascal.org/Using_Pascal_Libraries_with_Java, section dealing
with callback procedure ( but inside a thread).
Hum, i would prefer some demo-working-code from somebody who knows how
>> Did you use AttachCurrentThread and DetachCurrentThread?
Oops, what is that ? How must i use it ?
>> Pay attention to the validity of local references as well as their
>> number.
Idem, what is "local references as well as their number." ?
PS: Im a beginner with Java but, apart CallVoidMetho
On Fri, 2 May 2014, patspiper wrote:
dumping, try "ulimit -c unlimited" before starting Java again
Did you use AttachCurrentThread and DetachCurrentThread?
That is probably the "additional glue code" I was talking about in my reply.
Michael.
___
On 02/05/14 02:22, fredvs wrote:
Hello.
When a java class use a fpc library that call jni.CallVoidMethod inside a
thread it crash the application.
If the fpc library call jni.CallVoidMethod directly (not via a thread) =>
perfect, it works.
Is that a known problem ?
Maybe does it exist someth
>> In general, libraries and threading is not an easy story.
Ok,..., but what is your advice to do a CallVoidMethod inside a thread ?
PS: Everything, inside the thread is working perfectly, only CallVoidMethod
does crash...
Do you think i could have better result with a kind of post-messages ?
On Thu, 1 May 2014, fredvs wrote:
Hello.
When a java class use a fpc library that call jni.CallVoidMethod inside a
thread it crash the application.
If the fpc library call jni.CallVoidMethod directly (not via a thread) =>
perfect, it works.
Is that a known problem ?
Not known, but defini
Hello.
When a java class use a fpc library that call jni.CallVoidMethod inside a
thread it crash the application.
If the fpc library call jni.CallVoidMethod directly (not via a thread) =>
perfect, it works.
Is that a known problem ?
Maybe does it exist something else than jni.CallVoidMethod fo
28 matches
Mail list logo