このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


ericb's place: appleremote02 (part 4)

samedi, d?cembre 13, 2008

appleremote02 (part 4)

除去するing the F5 重要な

In appleremote01 cws, the 計画(する) was to send keycodes, and the sd had to 解釈する/通訳する as 命令(する)s for the slideshow. It 作品 perfectly, but has the drawback to not 尊敬(する)・点 the portability 基準.

As 交替/補充, I 修正するd the way events are sent to the 使用/適用

Before, we had :

[NSApp postEvent:

[NSEvent keyEventWithType:NSKeyDown
場所: NSZeroPoint
modifierFlags : modifierFlags
timestamp: 0
windowNumber: [[NSApp keyWindow] windowNumber]
状況: nil
characters: characters
charactersIgnoringModifiers: characters
isARepeat: toBeRepeated
keyCode: theKeyCode]
atStart: NO];

Means, for every 事例/患者, I sent the 権利 keycode, for the 権利 slideshow 命令(する) ( I passed the theKeycode variable to the postEvent method, using an keyEventWithType:NSKeyDown type) (for その上の (警察などへの)密告,告訴(状), see RemoteMainController.m appleremote01 )

The new 実施 is different :

1) I created a different event type (otherEventWithType:NSApplicationDefined ) sent to the NSApp


- (無効の) postTheEvent: (short int)buttonIdentifier modifierFlags:(int)modifierFlags
{
[NSApp postEvent:
[NSEvent otherEventWithType:NSApplicationDefined
場所:NSZeroPoint
modifierFlags:modifierFlags
timestamp: 0
windowNumber:[[NSApp keyWindow] windowNumber]
状況:nil
subtype:AppleRemoteControlEvent
data1: buttonIdentifier
data2: 0]
atStart: NO];
}


(for その上の (警察などへの)密告,告訴(状), see RemoteMainController.m appleremote02)

2) in AquaSalInstance::handleAppDefinedEvent(), the NSApp (悪事,秘密などを)発見するs the event (in vcl/aqua/app/salinst.cxx ), and turns it into a MEDIA_COMMAND_(some_name) event through the data1 parameter. Then, the sd received the event throught the eventlistener, and does the 派遣(する)ing to the ::命令(する) and ::通知する 器具/実施するd methods.

The problem was, it 作品 nicely for all events sent, but only when the slideshow is running.

Means: no way to start the slideshow using the same method as the one used for e.g. gotoNextSlide(), gotoFirstSlide() and so on. My first 切り開く/タクシー/不正アクセス was to continue to create, in salinst.cxx, the NSKeyDown event. The problem is ... it is just a 切り開く/タクシー/不正アクセス.

So I decided to 人物/姿/数字 out what was happening. And for that, I 器具/実施するd new methods (uggly buggy 切り開く/タクシー/不正アクセスs, but very usefull to trace everything at runtime), in sd/source/ui/見解(をとる)/viewshel.cxx (see the diff for その上の (警察などへの)密告,告訴(状))

What I discovered, is, the events coming from the remote are never seen, when the slideshow is not started !

My first tries where: maybe I do no send the event to the 権利 でっちあげる,人を罪に陥れる ? So I 器具/実施するd another 切り開く/タクシー/不正アクセス, when sending the "PLAY" 命令(する). The idea was to check for every でっちあげる,人を罪に陥れる, and see what happens ... More 正確に, doing :

switch ([pEvent data1])
{
事例/患者 kRemoteButtonPlay:
{
nCommand = MEDIA_COMMAND_PLAY;
std::名簿(に載せる)/表(にあげる)::iterator it = pSalData->maFrames.begin();
while( (*it) && (it != pSalData->maFrames.end()) )
{
AquaSalFrame* pFrame = (*it);
Window * pWindow = pFrame->GetWindow();
if( pWindow )
{
const Point aPoint;
CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, &nCommand );
NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt );
fprintf( stdout, "EVENT_COMMAND 通知するd from
AquaSalInstance::handleAppDefinedEvent \n");

if ( !ImplCallPreNotify( aNCmdEvt ) )
pWindow->命令(する)( aCEvt );
}
it++;
}
}


But nothing ... After tracing a lot, and using the backtraces for working and not working events, Philipp Lohmann 示唆するd me to check the 焦点(を合わせる)d window.

So did I, using Window* pWindow = 使用/適用::GetFocusWindow(); instead of the 名簿(に載せる)/表(にあげる) of でっちあげる,人を罪に陥れるs.
And one more time, it was not working :-/

So what is the problem ? After yet another discussion on IRC, Philipp finaly 設立する the 推論する/理由, に引き続いて ( if I'm not wrong) Christian Lippka explanations : the draw event listener for the slideshow is not active.

More 正確に, the "play" does not work on Windows too. The 推論する/理由 is, as soon as the slideshow 存在するs, it 登録(する)s as event listener of the 使用/適用. But that is AFTER the slideshow is started. Said 異なって, the slideshow doesn't 存在する at all, before the F5 重要な is 圧力(をかける)d :)

=> So the events go nowhere (what I 立証するd since several days ;) )

The 解答 (see 問題/発行する 97195 ) in the 空気/公表する is the sd to 登録(する) as event handler before. Andre Fischer is the specialist, and will work on that.

So far, once it will work, I'll just 直す/買収する,八百長をする that in 2 minute, and this is the last change I see before to 宣言する the cws as Ready for QA (and find someone for the QA ...) : everything else 作品, 含むing a new little feature: play/pause when slideshow started.

Crossing the fingers to see the change occur before the 最終期限 of 3.1 (waiting, I'll have a look at how eventlistener work ... cannot be bad to understand how things work ... ;-) )

.. to be continued ...

Libell?s : , , , , , ,