Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
there is a bug in xml parse and write
<mesh ="" indexMaterials="false" renderingDistance="" receiveShadows="true" castShadows="true" path="demos%2fkidkitchen%2fmesh%2fknife%5fdeco%2emesh" alias="" name="knife%5fdeco01" id="130">
there is a empty key value pair " = "" "
hi,
flash source project is missing
the chat plugit
only have chat.swf file
kenshin
hi,arkeon
you use mbstowcs and wcstombs function to convert the string and wstring,not enough ,also should set setlocale(LC_ALL, "chs");.
but you can choose another way
like
std::wstring Ansi2WChar(LPCSTR pszSrc, int nLen)
{
int nSize = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszSrc, nLen, 0, 0);
if(nSize <= 0) return NULL;
WCHAR *pwszDst = new WCHAR[nSize+1];
if( NULL == pwszDst) return NULL;
MultiByteToWideChar(CP_ACP, 0,(LPCSTR)pszSrc, nLen, pwszDst, nSize);
pwszDst[nSize] = 0;
if( pwszDst[0] == 0xFEFF) // skip Oxfeff
for(int i = 0; i < nSize; i ++)
pwszDst[i] = pwszDst[i+1];
wstring wcharString(pwszDst);
delete pwszDst;
return wcharString;
}
std::wstring s2ws(const string& s){ return Ansi2WChar(s.c_str(),s.size());}
std::string WChar2Ansi(LPCWSTR pwszSrc)
{
int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL);
if (nLen<= 0) return std::string("");
char* pszDst = new char[nLen];
if (NULL == pszDst) return std::string("");
WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL);
pszDst[nLen -1] = 0;
std::string strTemp(pszDst);
delete [] pszDst;
return strTemp;
}
string ws2s(wstring& inputws){ return WChar2Ansi(inputws.c_str()); }
and about the flash keyborad input:
void FlashControl::handleKeyEvent(UINT msg, WPARAM wParam, LPARAM lParam)
{
LRESULT aResult;
if(msg == WM_CHAR)
{
if(wParam > 0x7F)
{
if(!__mbr_enable)
{
__mbr_enable = true;
__mbr_save_w = wParam;
__mbr_save_l = lParam;
}
else
{
__mbr_enable = false;
windowlessObject->OnWindowMessage(msg, wParam, lParam, &aResult);
windowlessObject->OnWindowMessage(msg, __mbr_save_w,__mbr_save_l, &aResult);
}
}
else
{
__mbr_enable = false;
windowlessObject->OnWindowMessage(msg, wParam, lParam, &aResult);
}
}
else
windowlessObject->OnWindowMessage(msg, wParam, lParam, &aResult);
}
because the code
fact input :中文测试 : d6 d0 ce c4 b2 e2 ca d4
displayed :兄奈獠允 : d0 d6 c4 ce e2 b2 d4 ca
this is why everything happening.when windows decide to transfer a unicode character,it will send two WM_CHAR to the target window,first the lower two bytes,then the higher two bytes.maybe this is windows needed,but it seems the flash player doesn`t think so.so what we have to do is quite simple.we should reverse the two WM_CHAR messages before they were sent to flash player activex.we will need some hacking on our Hikari.in the FlashControl::handleKeyEvent,we join a procedure before calling windowlessObject->OnWindowMessage.we pick the WM_CHAR message,then check the wParam,if it`s not an ascii character,then we do something discussed above,else we just pass it.
ok,no problem
problem come from here,
the flash interface plugint when recieve the message form flash
fun cbGetMessage(flashctrl, constr, message, args)=
_DMSevent this (getPluginInstanceEvent constr.FLINT_instance message) (listToString args) nil;
0;;
it will call listToString function and this function will call strbuild.
strbuild will convert unicode word to \xxx\xxx\xxx\xxx format
so if I use strextr before show dialog,string display correct.
let hd hd (strextr message) -> message in
but this is only display the first word...
so we need use strcatn replace the listToString
fun listToString(l)=
let nil -> ret in
(
let sizelist l -> size in
let 0 -> i in
while (i < size) do
(
let nth_list l i -> line in
let strextr line -> lp in
set ret = lcat ret (hd lp)::nil;
set i = i + 1;
);
if ret == nil then nil else strbuild ret;
);;
wooh ...
i remember that scol could manage chinese language, but flash seem's to send unicode ?!
is other interface manage correctly chinese language ? (in dialog box title for example)
another cause could be a missed conversion in hikari flash call
other interface like dialogbox can display chinese correctly,
somewhere in scol trun the chinese string to \xxx\xxx\xxx\xxx
fun cbGetMessage(flashctrl, constr, message, args)=
_DMSevent this (getPluginInstanceEvent constr.FLINT_instance message) (listToString args) nil;
0;;
after function listToString the value changed...
my flash ui call pass a chinese words to scol,
then i use dailog box and debug console to display that words,
but the reasult is like this:
\198\223\292\198
how to convert it to factual string? is there any function I missed?
#define MTOI(val) ((val)>>1)
#define MTOP(val) ((val)>>1)
#define ITOM(val) ((val)<<1)
#define PTOM(val) (((val)<<1)+1)
_inline float MTOF(int val) { return *(float*)&(val); }
_inline int FTOM(float val) { return ((*(int*)&(val)) & 0xfffffffe); }
these operation >> << &fffffffe
wouldn't it decrease the numbers's precision?
How scol deal with that.
trunk/scol_applications/openspace3d/os3dlib/keyblib.pkg line 146
how can be the compare function set nil?
let exec nil with [a x] -> r in
wouldn't this code produce probelm?
hey,guys
what's meaning of _refreshExe?
I can't find related info in scol doc
hey Nodrev, thanks ,you are so great.
but the Awesomium 's problem ,can we fix it with open source fork.
defcom maincom = main S I S;;
defcom CaddHistory = addHistory S;;
fun main(name,r,s)=
// add the url in voyager history
_on _masterchannel CaddHistory [name];
_load "locked/lib/loc.pkg";
_load "locked/stduser1.pkg";
_script mkscript maincom [name r s];
0;;
why can not wrote like this?
defcom CaddHistory = addHistory S;;
fun main(name,r,s)=
// add the url in voyager history
_on _masterchannel CaddHistory [name];
_load "locked/lib/loc.pkg";
_load "locked/stduser1.pkg";
main name r s;
0;;
EDIT iri : add <code> ...
cool ,it will be really fast that if don't need to iterate throught subentites
thank you ,iri
Hey,I use the notepad++ ,
but the new version of it cannot run the plugin FunctionList.
So any better solution?
how about precompliedhead file
I am sorry It not work...
mine is Microsoft Speech Recognizer 8.0 for Windows.
in default the Speech is closed ,need open this function manually
I am use Win7 chinese version
hey,guys
the car show room demo,
I speak black red ,.......
but nothing happened
the scolCbMachine.h file
hey,guys
why the fread function need callback?
w->SCgetsocket=SCgetsocket;
w->Mcutting=Mcutting;
w->MMechostr=MMechostr;
w->fread=fread;
w->Firstpack=Firstpack;
w->OBJcreate=OBJcreate;
w->OBJaddreflex=OBJaddreflex;
w->OBJbeginreflex=OBJbeginreflex;
w->OBJdel=OBJdel;
merry christhmas!