[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum :: View topic - Help me with these script... Clone doesn't seem to work
XWidgetSoft Forum
https://bbs.xwidget.com/

Help me with these script... Clone doesn't seem to work
https://bbs.xwidget.com/viewtopic.php?f=8&t=4344
Page 1 of 1

Author:  digigamer [ April 8th, 2014, 7:48 am ]
Post subject:  Help me with these script... Clone doesn't seem to work



Attachments:
sidebar_dock.xwp [6.77 KiB]
Downloaded 193 times

Author:  Jimking [ April 8th, 2014, 9:31 am ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

One thing that I found is that you forgot to fill the "OnClick" function of the template with the "!Open".
But tested and even with this code the shortcut doesn't work/open the file.
Why not use shortcuts like a normal dock widget..?

Author:  qiancang [ April 8th, 2014, 6:13 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

var icon = template.Clone(list);
icon.parent = list;
icon.scripter = widget.scripter;

Author:  digigamer [ April 8th, 2014, 6:20 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work


Author:  digigamer [ April 8th, 2014, 6:22 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work


Author:  qiancang [ April 8th, 2014, 6:35 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

all icons have been created.
if you set icon.src = WidgetPath+'default.png', you can see them after adding shortcuts.
but their src don't change. it's strange.

Author:  digigamer [ April 8th, 2014, 10:13 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

Yes... that's the problem... Something with the core?

I even tried using an image inplace of the button, still nothing...

Author:  meme [ April 8th, 2014, 11:07 pm ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

As you have already said the shortcuts and icons are created... if you right click on the shortcuts and select - edit shortcut - the path, name and ICON appear correctly.
If you edit shortcut 1 it updates OK, so shortcut 1 is working all OK.
So if shortcut 1 works OK ... What is the difference between shortcut 1 and the others ???
As you said it seems to be the clone process that makes it not work ???

Author:  digigamer [ April 9th, 2014, 12:03 am ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

Thanks qiancang... A little hint was enough!
Looks like we needed to set the absolute path of the icon not the relative ones...

icon.Coreformat = WidgetPath+'\\%item'+i+'_Icon';

However, this causes the !Open to not fire correctly... Still, a fix was possible using event handlers.

Will post the scripts after a little finishing touches :mrgreen:

Author:  qiancang [ April 9th, 2014, 5:05 am ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

for(i = 1; i<= nIcons; i++) {
var icon = template.Clone(list);
widget.InitControl(icon); // it's necessary!
icon.Parent = list;
icon.Name = "icon"+i;
icon.Top = (i-1)*72 + 4;
icon.Left = 0;
icon.Core = shortcutlistcore1;
icon.Coreformat = '%item'+i+'_Icon';
icon.Visible = true;
}

Author:  digigamer [ April 10th, 2014, 12:10 am ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work

When was this method added??

Author:  qiancang [ April 10th, 2014, 12:22 am ]
Post subject:  Re: Help me with these script... Clone doesn't seem to work


Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/