I recently purchased Grialkit and was creating a simple walkthrough for an app that I'm developing.
I'm following the examples that are included in my grialkit.
I have a page, called WalkthroughPage. The XAML of this page looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WhoseKitchenApp.Views.Walkthroughs.WalkthroughPage"
xmlns:artina="clr-namespace:UXDivers.Artina.Shared;assembly=UXDivers.Artina.Shared"
xmlns:local="clr-namespace:WhoseKitchenApp;assembly=WhoseKitchenApp">
<!-- following line is line 9 -->
<local:Views.Walkthroughs.Templates.WalkthroughStepItemTemplate BackgroundColor="#FF6600" Header="Header text 1" Text="Welcome slide 1" IconColor="#5F7DD4" ButtonBackgroundColor="#5F7DD4" ButtonText="Next" />
<!-- following line is line 11 -->
<local:Views.Walkthroughs.Templates.WalkthroughStepItemTemplate BackgroundColor="#FF6600" Header="Header text 2" Text="Hello slide 2" IconColor="#7C4ECD" ButtonBackgroundColor="#7C4ECD" ButtonText="Next" />
<local:Views.Walkthroughs.Templates.WalkthroughStepItemTemplate BackgroundColor="#FF6600" Header="Header text 3" Text="Last slide, slide 3" IconColor="#E51E61" ButtonBackgroundColor="#E51E61" ButtonText="Finish" />
</CarouselPage>
I created an template called WalkthroughStepItemTemplate which I use to display information about the app.
When running my app, I get an XamlParseException:
Position 11:6. Type local:Views.Walkthroughs.Templates.WalkthroughStepItemTemplate not found in xmlns clr-namespace:WhoseKitchenApp;assembly=WhoseKitchenApp
In the code above, I placed a comment where that line 11 is. As you can see, the first time WalkthroughStepItemTemplate is called it looks just fine, but on the second try, it generates the exception.
I tried changing the clr-namespace to WhoseKitchenApp.Views.Walkthroughs.Templates, but I still have the same exception than. Also changing line 11 in the example to
<local:WalkthroughStepItemTemplate ...
has no effect.
Linker Behavior for both iOS and Android apps is set to Don't Link - Tip from the SO question
I'm wondering why the second (and third) time I get an XamlParseException.
Related
I'm using Syncfusion's sfTabView for my MAUI app and I have the content of all my tabs set as Pages from seperate files to avoid my main page being 1000+ lines long.
The problem is that sfTabItems do not directly support Pages as content so I have them wrapped in a grid, which works in debug mode, but crashes on start if I run it not in debug mode. Is there a workaround for this?
xmlns:views="clr-namespace:MyProject.Views"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
<tabView:SfTabView>
<tabView:SfTabView.Items>
<tabView:SfTabItem>
<tabView:SfTabItem.Content> <!-- content does not directly support ContentPages -->
<Grid>
<views:HomePage /> <!-- allowed (in debug) when wrapped in a grid -->
</Grid>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView.Items>
</tabView:SfTabView>
The first error in my device log is as follows:
Time Device Name Type PID Tag Message
12-20 11:32:44.439 pixel_5_-_api_29 Error 4343 * Assertion: should not be reached at /__w/1/s/src/mono/mono/mini/mini-exceptions.c:456
Followed by:
Time Device Name Type PID Tag Message
12-20 11:32:44.439 pixel_5_-_api_29 Error 4343 libc Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4343 (.myproject), pid 4343 (.myproject)
My app is working fine but my compiler is behaving in a very uncanny way. I am creating an android app using Kotlin & room database which allows user to add their favorite dishes. Suppose a person like noodles, then he/she can add a picture , instructions , ingredients etc. regarding noodles. I have one fragment where all our added dishes are shown in a recycler view and upon clicking any recycler view item , a new fragment opens up which shows detailed info about the clicked dish. Hence I need to pass information from one fragment to another and while doing so, it shows me an error while I implement the navArgs() function. Can Someone guide me please. My fragment names are AllDishesFragment & DishDetailFragment
This is my mobile-navigation code . ->
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/mobile_navigation"
app:startDestination="#+id/navigation_all_dishes">
<fragment
android:id="#+id/navigation_all_dishes"
android:name="com.example.favdish.view.fragments.AllDishesFragment"
android:label="All Dishes"
tools:layout="#layout/fragment_all_dishes" >
<action
android:id="#+id/action_navigation_all_dishes_to_navigation_dish_details"
app:destination="#id/navigation_dish_details" />
</fragment>
<fragment
android:id="#+id/navigation_dish_details"
android:name="com.example.favdish.view.fragments.DishDetailsFragment"
android:label="Dish Details"
tools:layout="#layout/fragment_dish_details">
<argument
android:name="dishDetails"
app:argType="com.example.favdish.model.entities.FavDishEntity"/>
</fragment>
</navigation>
This function is coded in the AllDishesFragment. With the help of nav controller it takes me to the DishDetailFragment. I have called this function in the recycler view adapter. Since I am using the room databse , FavDishEntity is the name of my entity
fun dishDetails(favDishEntity : FavDishEntity){
findNavController().navigate(AllDishesFragmentDirections.actionNavigationAllDishesToNavigationDishDetails(
favDishEntity
))
}
Now I tried implementing navArgs() in my DishDetailFragment but it shows a red line under it . Can someone please guide me ->
I'm developing a custom filter to my file format. Everything works fine when I use any of system keys from <propkey.h> like PKEY_Search_Contents.
But now I need to have my custom properties to register and use with Windows Search. Imagine:
"SELECT * FROM SystemIndex WHERE scope ='file:C:/' AND Publisher.Item.CustomProperty LIKE '%Test%'"
I saw about Property Handlers and already tested. I used the RecipePropertyHandler project from Windows 7 SDK Samples. And when I searched with this code:
// get a property store for the mp3 file
IPropertyStore* store = NULL;
HRESULT hr = SHGetPropertyStoreFromParsingName(L"SomePath",
NULL, GPS_DEFAULT, __uuidof(IPropertyStore), (void**)&store);
hr = HRESULT_FROM_WIN32(GetLastError());
PROPVARIANT variant;
store->GetValue(PKEY_Microsoft_SampleRecipe_Difficulty, &variant);
//// very important undocumented method
store->Release();
CoUninitialize();
I receive the correct answer.
But I don't understand how to union IFilter with IPropertyStore to create my custom properties. To start my IFilter, I used the example from Windows 7 SDK Samples. I'm doing something like:
chunkValue.SetTextValue(PKEY_SearchContents, filtered.c_str(),CHUNK_TEXT, 1046, 0, 0, CHUNK_EOS);
I didn't found the link anymore anymore but I read a quote of msdn about you can't implement IFilter AND IPropertyStore together. It's that true? Talking in other words, I can't create a custom property?
I saw all links from msdn, like link, link2 or any other.
I can do separate things but I don't know how to union both.
Any ideia how to implement?
EDIT
Im trying yet implement the PropertyHandler. My .propdesc file have this content:
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/windows/2006/propertydescription"
schemaVersion="1.0">
<propertyDescriptionList publisher="Microsoft" product="SampleRecipe">
<propertyDescription name="Microsoft.SampleRecipe.Difficulty" formatID="{1794C9FE-74A9-497f-9C69-B31F03CE7EF9}" propID="100">
<description>This property indicates the preparation difficulty of a recipe.</description>
<searchInfo inInvertedIndex="true" isColumn="true" />
<typeInfo type="String" multipleValues="false" isViewable="true" />
<labelInfo label="Recipe difficulty" invitationText="Specify recipe difficulty" />
<displayInfo displayType="Enumerated" >
<editControl control="DropList"/>
<enumeratedList>
<enum value="Easy" text="Easy" />
<enum value="Medium" text="Medium" />
<enum value="Hard" text="Hard" />
</enumeratedList>
</displayInfo>
</propertyDescription>
<propertyDescription name="Microsoft.SampleRecipe.Keywords" formatID="{16D19FCB-7654-48AB-8057-DF8E51CC0755}" propID="100">
<description>This property indicates the preparation difficulty of a recipe.</description>
<searchInfo inInvertedIndex="true" isColumn="True"/>
<typeInfo type="String" multipleValues="true" isViewable="true" />
<labelInfo label="Recipe Keywords" invitationText="Specify recipe keyword" />
</propertyDescription>
</propertyDescriptionList>
</schema>
On Windows Properties:
I receive all informations from file... but when I try to search with Windows Search like:
SELECT Microsoft.SampleRecipe.Keywords FROM SystemIndex
Where directory='somedirectory'
I receive all lines empty... Any ideias why?
EDIT
I can see my properties on PropSchema:
I can use my Microsoft.SampleRecipe.DifficultyV2 on my WSSQL Query like:
SELECT Microsoft.SampleRecipe.KeywordsV2 FROM SystemIndex WHERE directory='C:\users\step\documents\rvffilter\'
But all the contents are empty
I have created a XamMenu in my silverlight page. It consists of 4 options in it. The header for the first item is 'order'. I am using xamMenuItem.icon to add an image on the right side of the header text. But it is always coming on the left side of the header text. How can I do that? Please help.
My xaml code id like this:
<ig:XamMenu x:Name="xamOrderMenu" Height="22" Width="120" ExpandOnHover="True" Canvas.Left="361" Canvas.Top="10">
<ig:XamMenuItem Header="Order" SubmenuPreferredLocation="Bottom" Background="LightGray" FontWeight="Bold" Cursor="Hand">
<ig:XamMenuItem.Icon>
<Image Source="/Asset.View;component/Images/downarrow.PNG"/>
</ig:XamMenuItem.Icon>
<ig:XamMenuItem Header="Order1" StaysOpenOnClick="True" Background="LightGray" Click="ExportToExcel_Click" Cursor="Hand"/>
<ig:XamMenuItem Header="Order2" Background="LightGray" Click="DownloadFundCountTemplate_Click" Cursor="Hand"/>
<ig:XamMenuItem Header="Order3" Background="LightGray" Click="UploadTemplate_Click" Cursor="Hand"/>
<ig:XamMenuItem Header="Order4" Background="LightGray" Click="SearchAndExportToExcel_Click" Cursor="Hand"/>
</ig:XamMenuItem>
You're going to need to retemplate the XamMenuItem to place the icon in a different spot. In the default template, the XamMenuItem is seperated into 3 columns. The icon is placed into the left-most column, header text in the center and the child indicator in the right-most column.
If you have the Infragistics product installed you have access to the default template. You can find it here:
C:\Program Files (x86)\Infragistics\NetAdvantage (release version #)\Silverlight\DefaultStyles\XamMenu
Open the generic.xaml file and do a search for XamMenuItem and the first thing that comes up should be the style for it. The template can be found there. Add this style and its dependencies to your project and then make the necessary adjustments to place the icon on the right side of the header text. You can then assign this style to your XamMenuItems.
I want to know what is the suitable replacement for this line.
this.__LZtextclip.text
I am using this to get the string present in the text node. This works fine in Openlaszlo 3.3 but in 4.9 and 5.0 it's giving a problem
I tried updating it to
this.sprite.__LZtextclip.text
And i am getting an error:
79: Error: Access of possibly undefined property __LZtextclip through a reference with static type LzSprite, in line: Debug.write(this.sprite.__LZtextclip.text);
Any idea why this problem is happening?
If you are trying to access the text content of a text field, why don't you just access the attribute text?
<canvas>
<text name="sample" id="gRead" />
<handler name="oninit">
gRead.setAttribute('text',"HI");
Debug.info(gRead.text);
</handler>
</canvas>
In OpenLaszlo 3.3 there is method getText(), which gives you the same value. Accessing mx.textfield in your code does not work for the DHTML runtime.
Edit: Added information regarding the stripping of HTML tags
The Flash Textfield class flash.text.Textfield provides an API to enable HTML tag content in a Textfield instance. There are two different properties, one called text, the other one htmlText. If you want to directly access the Flash Textfield object of an lz.text instance, it's a property of the display object of the lz.text instance:
// Flash Textfield instance
gRead.getDisplayObject().textfield
// Pure text content
gRead.getDisplayObject().textfield.text
// Formatted text
gRead.getDisplayObject().textfield.htmlText
You should be aware of the fact that Flash automatically adds HTML format to any textstring you set as content. When you do
gRead.setAttribute('text',"HI");
the textfield.htmlText value is
<P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="11" COLOR="#000000" LETTERSPACING="0" KERNING="1">HI</FONT></P>
For the DHTML runtime, the text content is added as the innerHTML of a <div> tag, and there is no standardized API to retrieve the pure text content of a DOM structure for a tag with content. You could write your own function to extract the text content, or use JavaScript functions from existing frameworks - like the jQuery text() function - to achieve the same result for the DHTML runtime.
I guess the reason is that Laszlo started using the Dojo based rich text editor for text input with HTML formatting since OpenLaszlo 4.0 or 4.1.
The best approach to have consistent behavior across runtimes when stripping tags is to do the conversion on the server-side. That's especially needed if you wan to have consistent whitespace treatment in multiline text, since there differences in how browsers treat whitespace. The question how to best strip tags from strings in JavaScript has been answered before on Stackoverflow, e.g. JavaScript: How to strip HTML tags from string?
Here is a cross-runtime example which works in DHTML with Firefox, Chrome, and it should work with IE9+:
<canvas>
<text name="sample" id="gRead" />
<handler name="oninit"><![CDATA[
gRead.setAttribute("text", 'Hello <b>World</b> OL');
Debug.info("gRead.text=" + gRead.text);
if ($dhtml) {
Debug.info(gRead.getDisplayObject().textContent);
} else {
Debug.info(gRead.getDisplayObject().textfield.text);
}
]]></handler>
</canvas>
I found what is the problem. The problem is that i have to declare a variable and have to refer the property from that.
<canvas>
<library>
<text name="sample" id="gRead">
<method name="getTextFrom">
Debug.write("this.text" , this.sprite);
var mx = this.sprite;
Debug.write("this.text" , mx.textfield.text);
</method>
</text>
</library>
<handler name="oninit">
gRead.setAttribute('text',"HI");
gRead.getTextFrom();
</handler>
</canvas>