Questions tagged [variants]
62 questions
18
votes
5 answers
Managing null values in variants using Delphi
I'm working with a COM component which exposes a lot of Variant properties, but sometimes these values are null. When I try to convert these values to string (or another Delphi type) the application raises an exception like this:
Could not convert…

Salvador
- 16,132
- 33
- 143
- 245
13
votes
2 answers
Why does Format crash when anything but "%s" is used with a Variant?
I'm working with the SysUtils.Format function and variant values, and I found that this function only works if the format string is %s. I checked the documentation about the Format function but there does not exist any reference to how variant…

RRUZ
- 134,889
- 20
- 356
- 483
8
votes
5 answers
How to tell if a Delphi variant is an empty string?
Variants are always fun, eh?
I am working on a legacy application that was last in D2007 to migrate it to Delphi XE.
Variants have changed quite a bit in the interim.
This line of code:
if (VarType(Value) = varString) and (Value = '') then
…

Nick Hodges
- 16,902
- 11
- 68
- 130
8
votes
1 answer
Adding strings and variants in Delphi
The way adding strings and variants behaves in Delphi (10.2 Tokyo) was a complete surprise to me. Can someone provide a reasonable explanation for this "feature" or shall we call it a bug ?
function unexpected: string;
var v: Variant;
begin
result…

Peter
- 123
- 1
- 8
7
votes
1 answer
OCaml: circularity between variant type and module definition
I'm switching from Haskell to OCaml but I'm having some problems. For instance, I need a type definition for regular expressions. I do so with:
type re = EmptySet
| EmptyWord
| Symb of char
| Star of re
| Conc of re list
| Or of…

vegetus
- 95
- 5
7
votes
4 answers
Product Variants: Multiple Activities
I'm using Product Variants in gradle/android studio to achieve the following project setup:
Two apps, that are 80% similar in one android studio project.
Each app should have its own manifest package path (they should basically behave like two…

Dominik Schreiber
- 769
- 2
- 15
- 25
4
votes
1 answer
bt-hybrid, iso-hybrid, webboot; What is the difference?
I recently had to pick a Linux distribution to download from a website.
I was confronted with three choices; a bt-hybrid version, a iso-hybrid version and a webboot version. What are the differences?

Jim Julian
- 51
- 1
- 4
4
votes
1 answer
Show All Color Variants on Collection page in Shopify using Brooklyn Theme
Hey i am using brooklyn theme in my shopify website. I have different products will color variants . When i click on collection page i want to show all color variants of that products as separate products. I am googling since last night any help…

Ibrahim
- 77
- 1
- 9
4
votes
2 answers
What does mean VarType(aVariant) = 273 (or $111)?
What does mean VarType(aVariant) = 273 (or $111)? It's undocumented variant type. VarTypeAsText(aVariant) returns Expression illegal in evaluator error.

Dmitry
- 14,306
- 23
- 105
- 189
3
votes
2 answers
Multiple google-services.json Per Product Flavour
I think this is a variation on other questions that have been posed on this subject.
I have two product flavors. I deploy my app in different environments, each of which talk to different Firebase projects. As such, for each flavor I need to be able…

user3352488
- 281
- 3
- 15
3
votes
1 answer
Error in breseq during running bowtie2
I recently tried to use breseq to analyze a few bacterial sequencing data. However, I got a fatal error when breseq used bowtie2 to align the raw data to the reference genome.
Here is the critical part of the error that I got:
+++ NOW PROCESSING…

Tri M. Le
- 53
- 4
3
votes
2 answers
How to configure default layouts to use with Rails 4.1 Variants?
I'm trying to leverage Rails Variants to use a different layout for phones, and a different one (default one) for tablets+desktops.
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs,…

sergserg
- 21,716
- 41
- 129
- 182
3
votes
3 answers
Shopify Variants
Wondering if there is any way to assign variants to custom radio inputs? I'd like to set up tiered shipping with different rates for 2 Day, 3 Day and Standard shipping. I can do this with variants but the drop down won't work for me.I'd like to have…

susan
- 372
- 2
- 5
- 19
3
votes
1 answer
Writing 2nd dimension to Range from a 2D variant without looping in VBA
I have a variant variable, and pass the following range values to it like so.
Option Base 1
Dim varEmployees As Variant
varEmployees = Range("A1:B5").Value
This 2D variant now has Employee IDs in the 1st dimension and Employee names in the 2nd. So…

Django
- 85
- 1
- 4
3
votes
0 answers
How to hide unavailable product variants in Shopify?
I'm trying to make only the available product variants visible in drop downs for products like this one. For example, say you choose 2012 in the first drop down, it would only show the available choices in the second. If you then chose Wed 25th July…

TheTallOne
- 143
- 1
- 9