Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load developer stencil directory dosn't work #758

Open
spider4216 opened this issue Jan 17, 2023 · 4 comments
Open

Load developer stencil directory dosn't work #758

spider4216 opened this issue Jan 17, 2023 · 4 comments

Comments

@spider4216
Copy link

Hi there! First of all I want to say thank you for great tool for make GUI prototypes! I use it quite long and it's very helpful for my projects!
Recently I decided to create collection for prototyping GUI int the first time but faced with problem

According to manual Pencil provides a convenient way to load and reload stencil collection that is under development via "Load developer stencil directory" feature but it doesn't work for my project.

I created directory structure:

- icons/
- - - - Header-Purple.png
- Definition.xml 

My xml contains:

<Shapes xmlns="http://www.evolus.vn/Namespace/Pencil"
    xmlns:p="http://www.evolus.vn/Namespace/Pencil"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    id="ysirotenko-pencil-collection-1"
    displayName="KaIOS Components"
    description="Components for design apps for mobile operation system KaiOS"
    author="Yuriy Sirotenko"
    url="https://ysirotenko.com">
<!--Your shapes go here -->
    
    <Shape id="header" displayName="Header" icon="icons/Header-Purple.png">
        <p:Content xmlns:p="http://www.evolus.vn/Namespace/Pencil" xmlns="http://www.w3.org/2000/svg">
            <path id="path" fill="none" style="stroke-linejoin: round;"/>
        </p:Content>
    </Shape>


</Shapes>

Then I specified directory where my "Definition.xml" was placed via "Load developer stencil directory" feature

image

but there isn't any my collection in panel:

image

I pressed "F5", and saw popup with message "Developer collections were reloaded" but didn't see my collection

But when I zip this directory and install it from file, it's okay

image
image

Actually, when I clicked "Load developer stencil directory" menu's item, error was appeared in log:

[251447:0117/084430.342128:ERROR:browser_main_loop.cc(269)] Gtk: gtk_file_chooser_widget_set_current_name: assertion 'priv->action == GTK_FILE_CHOOSER_ACTION_SAVE || priv->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed

But everything is ok in Pencil GUI

Did I do something wrong? Thank you!

  • Operating system: Ubuntu 20.04.5 LTS (Focal Fossa)
  • Pencil version: 3.1.1
  • Node v19.4.0
  • NPM 9.2.0

Pencil was installed via source (npm install and npm start)

@donPablo2
Copy link

donPablo2 commented Jan 23, 2023

Tools/DeveloperTools/LoadDeveloperStencilDirectory…/ gives popup titles Select Developer Stencil ‘Definition.xml’ file
In menu it sez Directory, but on popup it sez File. Also, in popup the filter allows only for Definition.xml(*.xml)

After I select my Definition.xml and press “Open”, I do not see my new shape in any menu listing.

Windows Edition: Windows 10 Pro Version 21H2 OS build 19044.2486
Pencil version: 3.1.1

@rozek
Copy link

rozek commented Feb 10, 2023

I just encountered the same problem: on my Mac, I cannot even open the directory but always have to select a file - which seems to be wrong according to the docs

[Edit] the compressed stencil directory could be loaded without problems - it's just not a "developer stencil" collection...

@spider4216
Copy link
Author

I'm creating new stencil and have to build zip every time to see changes. It take too much time for developing...

@donPablo2
Copy link

yes, building a zip takes time. Last week I discovered a "loophole"
!! the myQuad folder does not need to be ZIP-ed; just rename with suffix .zip

I can open the Definition in notepad++, do edits, and save (not exit)
and then test via click taskbar Pencil.exe icon (or click VSCode icon & F5)
and quit Pencil, come back and do more edits, save, test, etc.

``C:\Users\myUSERID\.pencil\stencils > tree    /f
 └───myQuad.zip
    │     Definition.xml
    └───Icons
          plain-text.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants