SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Avoiding user anguish

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
pieterc



Joined: 02 Dec 2010
Posts: 2

PostPosted: Thu Dec 02, 2010 6:56 am    Post subject: Avoiding user anguish Reply with quote

I tried to use the method described in "Central Control for Large Application" but I guess my knowledge is a bit on the low side.

Can you give me a small example on how to use the following inside my code and how to call it

type
TsiInterceptStringChange = procedure(const AObject: TObject; const PInfo: PPropInfo; var APropValue: string);

Thanks
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Dec 02, 2010 11:22 am    Post subject: Reply with quote

Hello,

In your code you should define a procedure with the similar parameters as TsiInterceptStringChange.
Next you assign this procedure to siInterceptStringChange global variable defined in siComp.pas unit.
Then TsiLang will call this procedure EACH time it tries to return a translation for any string.
So the sample code could be something like this:
Code:

procedure MysiInterceptStringChange(const AObject: TObject; const PInfo:
    PPropInfo; var APropValue: string);
begin
  APropValue := APropValue + '---';
end;

siComp.siInterceptStringChange := MysiInterceptStringChange;
Back to top
View user's profile Send private message
pieterc



Joined: 02 Dec 2010
Posts: 2

PostPosted: Thu Dec 02, 2010 12:26 pm    Post subject: Reply with quote

Hi,

Thanks very much for your prompt reply. It is exactly what I have been struggling to do.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group